== Reverse Proxy for a Subdomain == The below Apache reverse proxy configuration lets another website be served through a domain. The example is a little contrived. {{{#!highlight apacheconf numbers=off ServerName proxied-site.samat.org ProxyPass / http://google.com/ ProxyPassReverse / http://google.com/ }}} == Cached Reverse Proxy == Use Apache's mod_disk to cache all requests made to a reverse proxy. For example, to setup a mirror to mirrors.kernel.org: {{{#!highlight apacheconf numbers=off # Configure mod_disk_cache (usually in /etc/apache/mods-enabled.d/disk_cache.conf) CacheRoot /path/to/cache # Configure reverse proxy ServerName proxied-site.samat.org CacheEnable disk / ProxyPass / http://mirrors.kernel.org/ ProxyPassReverse / http://mirrors.kernel.org/ }}} == Apache logging == {{{#!highlight sh # access.log should be vhost_combined by default sed -i 's/other_vhosts_access/access/g' /etc/apache2/conf.d/other-vhosts-access-log # Remove logging sed -i '/^\s*ErrorLog/d' /etc/apache2/sites-available/default sed -i '/^\s*CustomLog/d' /etc/apache2/sites-available/default }}} ---- CategoryCheatSheet