Skip to content

Instantly share code, notes, and snippets.

@epayet
Created October 28, 2014 09:51
Show Gist options
  • Save epayet/45e619665b1d49e51333 to your computer and use it in GitHub Desktop.
Save epayet/45e619665b1d49e51333 to your computer and use it in GitHub Desktop.
ReverseProxy
#Reverse proxy: http://blog.xn--hry-bma.com/article9/configurer-un-reverse-proxy-apache-http-https
#For http
a2enmod proxy
a2enmod proxy_http
echo -e "<VirtualHost *:80> \n ServerName url.com \n ProxyPreserveHost On \n ProxyRequests off \n ProxyPass / http://localhost:8081/ \n ProxyPassReverse / http://localhost:8081/ \n </VirtualHost>" > /etc/apache2/sites-available/test.conf
a2ensite test
a2dissite 000-default
/etc/init.d/apache2 reload
/etc/init.d/apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment