Browse Source

add cache control statements to the example apache configs

Natenom/support-murmur-13-1446181288462
Michael Ziegler 14 years ago
parent
commit
8726b60b81
  1. 17
      etc/apache2/dedicated_vhost.conf
  2. 16
      etc/apache2/shared_vhost.conf

17
etc/apache2/dedicated_vhost.conf

@ -19,4 +19,21 @@
WSGIDaemonProcess mumble-django threads=25
WSGIProcessGroup mumble-django
WSGIScriptReloading Off
# Cache optimization - not necessarily needed for MD, but nice to have :)
FileETag None
<IfModule mod_headers.c>
Header unset ETag
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=86400, must-revalidate"
</FilesMatch>
<IfModule mod_deflate.c>
# compress content
AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript image/png image/jpeg image/gif
# properly handle requests coming from behind proxies
Header append Vary User-Agent
</IfModule>
</IfModule>
</VirtualHost>

16
etc/apache2/shared_vhost.conf

@ -31,4 +31,20 @@
# ----------->8--------- cut here
# Cache optimization - not necessarily needed for MD, but nice to have :)
FileETag None
<IfModule mod_headers.c>
Header unset ETag
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=86400, must-revalidate"
</FilesMatch>
<IfModule mod_deflate.c>
# compress content
AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript image/png image/jpeg image/gif
# properly handle requests coming from behind proxies
Header append Vary User-Agent
</IfModule>
</IfModule>
</VirtualHost>
Loading…
Cancel
Save