Skip to content

Instantly share code, notes, and snippets.

@edavis10
Created October 9, 2008 20:41
Show Gist options
  • Save edavis10/15882 to your computer and use it in GitHub Desktop.
Save edavis10/15882 to your computer and use it in GitHub Desktop.
Redmine Apache config
<VirtualHost *:80>
ServerName example.com
ServerAdmin webmaster@localhost
RewriteEngine On
DocumentRoot /home/websites/example.com/current/public
<Directory "/home/websites/example.com/current/public">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# 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]
# Rewrite index to check for static
RewriteRule ^/$ /cache/index.html [QSA]
# Rewrite to check for Rails cached page
RewriteRule ^([^.]+)$ /cache/$1.html [QSA]
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/admin-access.log combined
ServerSignature Off
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment