Last active
February 4, 2016 21:27
-
-
Save joergpatz/96fec2b2e18c94477fd1 to your computer and use it in GitHub Desktop.
apache-proxy-vhost
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
# Forward Proxy | |
<VirtualHost *:80> | |
ServerAdmin admin@localhost | |
RewriteEngine On | |
ProxyPreserveHost On | |
RewriteRule ^/(.*) http://<HOST-OR-IP>/$1 [P] | |
<Proxy *> | |
Order allow,deny | |
Allow from all | |
</Proxy> | |
</VirtualHost> | |
# Reverse Proxy e.g. NODEJS Server | |
<VirtualHost *:80> | |
ServerAdmin admin@localhost | |
ServerName example.com | |
ProxyRequests off | |
<Proxy *> | |
Order allow,deny | |
Allow from all | |
</Proxy> | |
<Location /> | |
ProxyPass http://localhost:3100/ | |
ProxyPassReverse http://localhost:3100/ | |
</Location> | |
</VirtualHost> | |
<VirtualHost *:80> | |
ProxyPreserveHost On | |
ProxyRequests Off | |
ProxyPass / http://<HOST-OR-IP>/ | |
ProxyPassReverse / http://<HOST-OR-IP>/ | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment