Here's the apache conf file that has worked with all previous versions
of Passenger I've used up through 2.2.5. Fails with 2.2.7. This
happened with two different Rails 2.3.4 apps:
<VirtualHost *:80>
ServerName omitted
ServerAlias omitted
DocumentRoot /var/www/apps/omitted/staging-web/current/public
RailsEnv staging
<Directory /var/www/apps/omitted/staging-web/current/public>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
# Redirect old cgi-bin to
RedirectMatch /cgi-bin/* /
RailsAllowModRewrite on
RewriteEngine On
# Rewrite for XTF server
RewriteRule ^/xtf/(.*)$ http://127.0.0.1:8090%{REQUEST_URI} [P]
ProxyPreserveHost On
# Prevent access to .git directories
RewriteRule ^(.*/)?\.git/ - [F,L]
ErrorDocument 403 "Access Forbidden"
# Check for maintenance file and redirect all requests
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ /system/maintenance.html [L]
# Deflate
AddOutputFilterByType DEFLATE text/html text/plain text/xml
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
# Use Apache cookies, session tracking with mod_usertrack
CookieTracking on
CookieName "httpd_cookie"
CookieDomain .
staging.omitted.com
CookieExpires 3600
ErrorLog logs/staging.omitted.com-error_log
CustomLog "|/usr/sbin/cronolog /var/log/httpd/staging.omitted.com-
access_log.%Y-%m" "%{cookie}n %h %l\
%u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\""
# CustomLog logs/staging.omitted.com-access_log "%{cookie}n %h %l %u
%t \"%r\" %>s %b \"%{Referer}i\"\
\"%{User-Agent}i\""
#combined
</VirtualHost>