A
Andrew Arnott
I walked through Curt Hibbs' tutorial
(http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1) for
Ruby on Rails and was very impressed. So far though, I've only gotten
my Rails web site running through WEBrick. I'd like to get it running
through Apache. I have mod_ruby installed, and Apache's configuration
files now get Apache to correctly handle *.rhtml pages through eRuby.
But I haven't been able to figure out the Apache configuration to get
my Rails cookbook/recipe app to run from within Apache.
Below is the configuration section relevant to the discussion. Can
anyone please tell me what I am doing wrong, and how I can get Rails
running through Apache? (I believe I'm running the latest ruby and
rails available--from Gentoo Portage)
Thanks in advance. Configuration follows.
LoadModule ruby_module ../apache2-extramodules/mod_ruby.so
# Ruby scripts (.rbx) support
<IfModule mod_ruby.c>
RubyRequire apache/ruby-run
# Execute *.rbx files as Ruby scripts
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
</IfModule>
# eRuby (.rhtml) support
<IfModule mod_ruby.c>
RubyRequire apache/eruby-run
# Handle *.rhtml files as eRuby files
<Files *.rhtml>
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
</Files>
</IfModule>
Alias /cookbook "/home/ala55/rails/cookbook/public"
<Directory /home/ala55/rails/cookbook/public>
Order allow,deny
Allow from all
Options ExecCGI
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Directory>
(http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1) for
Ruby on Rails and was very impressed. So far though, I've only gotten
my Rails web site running through WEBrick. I'd like to get it running
through Apache. I have mod_ruby installed, and Apache's configuration
files now get Apache to correctly handle *.rhtml pages through eRuby.
But I haven't been able to figure out the Apache configuration to get
my Rails cookbook/recipe app to run from within Apache.
Below is the configuration section relevant to the discussion. Can
anyone please tell me what I am doing wrong, and how I can get Rails
running through Apache? (I believe I'm running the latest ruby and
rails available--from Gentoo Portage)
Thanks in advance. Configuration follows.
LoadModule ruby_module ../apache2-extramodules/mod_ruby.so
# Ruby scripts (.rbx) support
<IfModule mod_ruby.c>
RubyRequire apache/ruby-run
# Execute *.rbx files as Ruby scripts
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
</IfModule>
# eRuby (.rhtml) support
<IfModule mod_ruby.c>
RubyRequire apache/eruby-run
# Handle *.rhtml files as eRuby files
<Files *.rhtml>
SetHandler ruby-object
RubyHandler Apache::ERubyRun.instance
</Files>
</IfModule>
Alias /cookbook "/home/ala55/rails/cookbook/public"
<Directory /home/ala55/rails/cookbook/public>
Order allow,deny
Allow from all
Options ExecCGI
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Directory>