Skip to content

Instantly share code, notes, and snippets.

@nk23x
Created January 9, 2015 14:41
Show Gist options
  • Save nk23x/c9da45845e6c1507b6ae to your computer and use it in GitHub Desktop.
Save nk23x/c9da45845e6c1507b6ae to your computer and use it in GitHub Desktop.
apache config tips
== # Apache Internal Dummy Connection - what is it and what should I do with it? ==
If you wish to exclude apache dummy connections from your log:
SetEnvIf Remote_Addr "83\.170\.93\.77" loopbackaccess
CustomLog logs/access_log combined env=!loopbackaccess
== # ProxyPassMatch ==
ProxyPassMatch is available, which lets you specify a pattern (Regular Expression) for your forwarding - for example, if you wanted to forward all you image requests to an image server:
ProxyPassMatch ^/(.*\.jpg)$ http://images.wellho.net/$1
== # How do I point all the .html URLs in a directory at a single intelligent page? ==
RewriteRule ^(.*)\.html$ action.php?pagename=$1&%{QUERY_STRING}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment