Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
example config for site stuff
<IfModule mod_disk_cache.c>
# cache cleaning is done by htcacheclean, which can be configured in
# /etc/default/apache2
# For further information, see the comments in that file,
# /usr/share/doc/apache2.2-common/README.Debian, and the htcacheclean(8)
# man page.
# This path must be the same as the one in /etc/default/apache2
# note: to make things even faster, set noatime on these files
CacheRoot /var/cache/apache2/mod_disk_cache
# This will also cache local documents. It usually makes more sense to
# put this into the configuration for just one virtual host.
CacheEnable disk /
CacheDirLevels 5
CacheDirLength 3
CacheIgnoreNoLastMod On
## 000-mysite.conf
<VirtualHost *:80>
<Proxy *>
Allow from %{SERVER_NAME}
ProxyPreserveHost On
#RewriteLog "/srv/digiyoubuildout/var/log/rewrite.log"
#RewriteLogLevel 3
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.mysite\.com
RewriteRule ^(.*)$$1 [R=permanent,L]
RewriteCond %{HTTP_HOST} ^([^.]+)\.staging\.mysite\.com
RewriteRule ^/(.*)$$1 [L,P]
RewriteCond %{HTTP_HOST} ^([^.]+)\.mysite\.com
RewriteRule ^/(.*)$$1 [L,P]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment