Skip to content

Instantly share code, notes, and snippets.

@hgomez
Created March 28, 2013 22:48
Show Gist options
  • Select an option

  • Save hgomez/5267477 to your computer and use it in GitHub Desktop.

Select an option

Save hgomez/5267477 to your computer and use it in GitHub Desktop.
Apache Virtual Host for devops mercenaries lab
#
# Front non SSL
#
<VirtualHost *:80>
ServerName merc-front.hgomez.net
ServerAlias merc-front
ServerAdmin [email protected]
ErrorDocument 400 default
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 408 default
ErrorDocument 410 default
ErrorDocument 411 default
ErrorDocument 412 default
ErrorDocument 413 default
ErrorDocument 414 default
ErrorDocument 415 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 502 default
ErrorDocument 503 default
SetOutputFilter DEFLATE
SetInputFilter DEFLATE
# if not specified, the global error log is used
SetEnvIf Request_URI "^/server-status/*" dontlog
ErrorLog /var/log/apache2/front_error_log
CustomLog /var/log/apache2/front_access_log combined env=!dontlog
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName Off
# configures the footer on server-generated documents
ServerSignature On
# Don't route /cgi-bin (awstats for example)
SetEnvIf Request_URI "^/cgi-bin/*" no-jk
SetEnvIf Request_URI "^/awstats/*" no-jk
# JK relay
JkMount /* sh4relb
</VirtualHost>
m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment