Last active
January 29, 2018 15:45
-
-
Save douglascabral/2eb2cc43713effa582d688b34f270051 to your computer and use it in GitHub Desktop.
Example of Apache Proxy
This file contains hidden or 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> | |
ServerName nome-do-servidor.com.br | |
ServerAdmin webmaster@localhost | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
ProxyPass / http://127.0.0.1:8082/ | |
ProxyPassReverse / http://127.0.0.1:8082/ | |
ProxyRequests Off | |
#Proxy case insensitive | |
ProxyPassMatch "(?i)/something" "http://127.0.0.1:8082" | |
#(?i): case-insensitive match | |
#(.*): zero or more character | |
#$1: trailing text after match sting in the original string. for example (/site/index.html) | |
#Be careful with the trailing / | |
<Proxy http://localhost:8082/*> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Apache modules:
sudo a2enmod proxy
sudo a2enmod proxy_http
sudo a2enmod proxy_balancer
sudo a2enmod lbmethod_byrequests