Skip to content

Instantly share code, notes, and snippets.

@rrichards
Created June 30, 2010 20:16
Show Gist options
  • Save rrichards/459160 to your computer and use it in GitHub Desktop.
Save rrichards/459160 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
# Admin email, Server Name (domain name) and any aliases
ServerAdmin [email protected]
ServerName justinbuyertest.com
# Index file and Document Root (where the public files are located)
DirectoryIndex index.html
DocumentRoot /var/www/apps/websites.freedomsoft.com/current/public
# Custom log file locations
LogLevel warn
ErrorLog /var/www/apps/websites.freedomsoft.com/shared/log/error.log
CustomLog /var/www/apps/websites.freedomsoft.com/shared/log/access.log combined env=!dontlog
# Show maintenance page if it exists
ErrorDocument 503 /index.html
RewriteEngine On
RewriteCond %{REQUEST_URI} !\.(css|gif|jpg|png)$
RewriteCond %{DOCUMENT_ROOT}/index.html -f
RewriteCond %{SCRIPT_FILENAME} !index.html
RewriteRule ^.*$ - [redirect=503,last]
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
# Passenger
RailsEnv staging
PassengerUseGlobalQueue on
PassengerMaxPoolSize 30
SetEnv SERVE_WEBSITES true
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment