Created
January 6, 2014 18:04
-
-
Save fabriceleal/8286782 to your computer and use it in GitHub Desktop.
Apache as proxy
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
# From: | |
# http://stackoverflow.com/questions/17475587/setup-mod-proxy-on-apache-http-server | |
# http://www.forums.serverwatch.com/showthread.php?16887-mod_proxy-problem | |
# http://serverfault.com/questions/242650/setting-up-a-basic-mod-proxy-virtual-host | |
# http://stackoverflow.com/questions/14775248/apache-http-proxy-based-on-hostname | |
# http://stackoverflow.com/questions/1997001/setting-up-a-basic-web-proxy-in-apache | |
# http://ubuntuforums.org/showthread.php?t=983222 | |
# | |
# put on httpdvhosts.conf | |
# this is the bare bones, so if there's any trouble, I'll improve this snippet | |
LoadModule proxy_module modules/mod_proxy.so | |
LoadModule proxy_http_module modules/mod_proxy_http.so | |
<VirtualHost *:80> | |
# You might need to check the main httpd.conf to get the servername | |
ServerName localhost:80 | |
ProxyPass / http://anotherhost/somedir/ | |
ProxyPassReverse / http://anotherhost/somedir/ | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment