[deploy:web:disable] .htaccess, passenger, apache

182 views
Skip to first unread message

OmenKing

unread,
Feb 1, 2009, 12:00:45 AM2/1/09
to Capistrano
I get not errors when I run deploy:web:disable. It appears to be
creating the maintenance.html page.
I've placed this .htaccess in my current/public

RewriteEngine On

RewriteCond %{REQUEST_URI} !\.(css|jpg|png)$
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]

I have this for my virtual host.

<VirtualHost *:80>

ServerName markadee.com
ServerAlias www.markadee.com

DocumentRoot /home/monsterman/public_html/markadee/current/public

<Directory "home/monsterman/public_html/markadee/current/public">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

</VirtualHost>

I've enabled mod rewrite. Any ideas for debugging? I tried throwing
random text in my .htaccess file to see if would turn up an error but
it didn't

OmenKing

unread,
Feb 1, 2009, 12:15:25 AM2/1/09
to Capistrano
Also some interesting things to note.
If I remove all the routes, than it will pull up the 404 page as
expected.
If I add an index.html than it will show the maintence page (over the
index.html)
So is there something about routes and .htaccess files I should know
about?

RogEr

unread,
Feb 1, 2009, 3:14:08 PM2/1/09
to Capistrano
Not sure about the details but I think you have to do some
configuration for the .htaccess file to be used in newer versions of
apache. If its not a requirement for you to use the .htaccess file you
can put the rewrite instructions in the vhost file instead.

Regards
Roger

OmenKing

unread,
Feb 1, 2009, 3:38:33 PM2/1/09
to Capistrano
I solved the problem, and your exactly right RogEr, I ended up placing
it in my vhost and that fixed the problem.
There's more about it here:

http://code.google.com/p/phusion-passenger/issues/detail?id=113
http://groups.google.com/group/phusion-passenger/browse_thread/thread/0b49a45a4887137f
Reply all
Reply to author
Forward
0 new messages