Created
October 28, 2008 18:43
-
-
Save HendrikLouw/20468 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Template for apache config that uses expiry headers, gzip compression and etags | |
# Mainly aimed at Rails apps that run on passenger but I could use this everywhere else | |
<VirtualHost *:80> | |
ServerName servername.com | |
ServerAlias servername.com | |
DocumentRoot /var/rails/servername.com/public | |
SetOutputFilter DEFLATE | |
<Directory "/var/rails/servername.com/current/public"> | |
#Gzip | |
AddOutputFilterByType DEFLATE text/html text/css text/javascript | |
#Expiry headers | |
<ifmodule mod_expires.c> | |
<filesmatch "\.(ico|jpg|jpeg|gif|png|css|js|swf|flv|pdf)$"> | |
ExpiresActive on | |
ExpiresDefault "access plus 1 year" | |
</filesmatch> | |
</ifmodule> | |
# ETags | |
FileETag MTime Size | |
Options FollowSymLinks | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> | |
CustomLog /var/log/server-name-access.log combined | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment