john.e.jahan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Nov-13  19:31 UTC
Rail under Apache on Windows
I am trying to configure Apache 2 under XP to run my rails app using
CGI. I have modified my httpd.conf  as follows but it seems apache
doesn''t know I am invoking a Rails app and it gives me errors that it
cannot find the resource.
Is there anything else I need to do to get rails integrated into Apache
using CGI?
Thanks,
-John
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule env_module modules/mod_env.so
<VirtualHost *:8008>
   SetEnv RAILS_ENV development
   ServerName rails
   DocumentRoot C:/Development/test
   ErrorLog C:/Development/test/apache.log
   <Directory C:/Development/test>
      RewriteEngine On
      Options ExecCGI FollowSymLinks
      AddHandler cgi-script .cgi
      AllowOverride all
      Order allow,deny
      Allow from all
   </Directory>
</VirtualHost>
--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
john.e.jahan-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> I am trying to configure Apache 2 under XP to run my rails app using > CGI. I have modified my httpd.conf as follows but it seems apache > doesn''t know I am invoking a Rails app and it gives me errors that it > cannot find the resource. > > Is there anything else I need to do to get rails integrated into Apache > using CGI? > > Thanks, > > -John > > LoadModule rewrite_module modules/mod_rewrite.so > LoadModule env_module modules/mod_env.so > > <VirtualHost *:8008> > SetEnv RAILS_ENV development > ServerName rails > DocumentRoot C:/Development/test > ErrorLog C:/Development/test/apache.log > > <Directory C:/Development/test> > RewriteEngine On > Options ExecCGI FollowSymLinks > AddHandler cgi-script .cgi > AllowOverride all > Order allow,deny > Allow from all > </Directory> > > </VirtualHost>I''m assuming that your rails app is in C:\Development\test. The DocumentRoot for your virtual host should be C:\Development\test\public (where the dispatcher cgi programs and the .htaccess with all the necessary rewrite rules lives). Your <Directory> directive should also point down one more level to public, as opposed to the root of the rails app (<Directory C:/Development/test/public>). c. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---