Skip to content

Instantly share code, notes, and snippets.

@gsohoni
Created March 29, 2011 19:54
Show Gist options
  • Save gsohoni/893101 to your computer and use it in GitHub Desktop.
Save gsohoni/893101 to your computer and use it in GitHub Desktop.
General configuration for making wordpress work along with rails app on passenger
<VirtualHost *>
ServerName victorcode.com
ServerAlias www.victorcode.com
DocumentRoot /path/to/rails_apps/app/public
<Directory /path/to/rails_apps/app/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
allow from all
</Directory>
<Location /blog>
PassengerEnabled off
Options -Indexes FollowSymLinks MultiViews
Order allow,deny
Allow from all
</Location>
RailsAllowModRewrite On #passenger option. If not, rewrite rules will be overriden
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteCond %{SCRIPT_FILENAME} !.(js|gif|jpg|png|css)$
RewriteRule ^.*$ /system/maintenance.html [L]
# RewriteRule ^/blog/?(.*)$ %{DOCUMENT_ROOT}/blog/$1 [P,NC,QSA,L] is not required ..
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment