-
-
Save alanorth/8ef666f8f46ac03ef52a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
# The ServerName directive sets the request scheme, hostname and port t$ | |
# the server uses to identify itself. This is used when creating | |
# redirection URLs. In the context of virtual hosts, the ServerName | |
# specifies what hostname must appear in the request's Host: header to | |
# match this virtual host. For the default virtual host (this file) this | |
# value is not decisive as it is used as a last resort host regardless. | |
# However, you must set it for any further virtual host explicitly. | |
ServerName erepo.usiu.ac.ke | |
ServerAdmin webmaster@localhost | |
# not needed actually because we're proxying everything to Tomcat, but just leave it to make Apache happy | |
DocumentRoot /var/www/html | |
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn, | |
# error, crit, alert, emerg. | |
# It is also possible to configure the loglevel for particular | |
# modules, e.g. | |
#LogLevel info ssl:warn | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
# Preserve Host headers so Tomcat knows requests are coming for "erepo.usiu.ac.ke" | |
ProxyPreserveHost On | |
# Turn off open proxy requests (security loophole!!!) | |
ProxyRequests Off | |
# Pass requests to the :8080 Tomcat connector (from server.xml) | |
ProxyPass / http://localhost:8080/ | |
ProxyPassReverse / http://localhost:8080/ | |
<Proxy *> | |
allow from all | |
</Proxy> | |
</VirtualHost> | |
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment