Re: Problem with RailsDispatcher
Andre Nathan <[email protected]> Thu, 30 Nov 2006 21:20:56 -0200
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
Hi Kim
On Thu, 2006-11-30 at 12:56 -0700, Kim Shrier wrote:
> You might want to try enclosing the ruby directives inside the
> VirtualHost in a Location specification.
Did that, but got the same results.
> If this doesn't work, it would be useful to see the contents of
> the .htaccess file in /var/www/rails/myapp/public.
Here it goes. It's just the default .htaccess that rails installs, with
dispatch.cgi changed to dispatch.rb:
AddHandler fcgid-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.rb [QSA,L]
I tried adding "AddHandler ruby-script .rb" but that didn't change
anything.
> As an aside, I would change the "AllowOverride All" specification
> on the public directory to "AllowOverride None" and move any
> configuration directives you need out of the .htaccess file and
> into your httpd.conf file. This will make your accesses faster
> since the apache web server does not need to merge the .htaccess
> directives into its server configuration and re-evaluate the
> request with the updated configuration on every request that
> goes to /var/www/rails/myapp/public.
Thanks, I'll look into that as soon as I get mod_ruby to work :)
Andre