Skip to content

Instantly share code, notes, and snippets.

@Kennyl
Created March 6, 2017 14:06
Show Gist options
  • Save Kennyl/7f7052184347a4f91d2d113e7c7f6cdd to your computer and use it in GitHub Desktop.
Save Kennyl/7f7052184347a4f91d2d113e7c7f6cdd to your computer and use it in GitHub Desktop.
Apache Reverse Proxy Example
#/usr/sbin/setsebool httpd_can_network_connect 1 if cannot localhost
#/usr/sbin/setsebool -P httpd_can_network_connect 1 if cannot localhost
#
<VirtualHost *:80>
ProxyPreserveHost On
ServerName myhostname.com
ProxyPass / http://localhost:808/
ProxyPassReverse / http://localhost:808/
</VirtualHost>
<VirtualHost *:443>
SSLEngine on
SSLProxyEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /etc/webmin/letsencrypt-cert.pem
SSLCertificateKeyFile /etc/webmin/letsencrypt-key.pem
ServerName myhostname.com
<Location "/" >
ProxyPass http://127.0.0.1:808/
ProxyPassReverse http://127.0.0.1:808/
</Location>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment