Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ksze/c024122f350a80671ab1 to your computer and use it in GitHub Desktop.
Save ksze/c024122f350a80671ab1 to your computer and use it in GitHub Desktop.
<VirtualHost *:80>
ServerName www.my-site.com
RewriteEngine On
RewriteOptions inherit
# Hide the admin interface from the public internet. Make it only accessible from the company office
RewriteCond ${REMOTE_ADDR} !=153.64.172.11
RewriteRule ^/admin(/.*)? - [L,R=404]
RewriteRule ^/(.*)$ http://172.20.11.13/$1 [L,P]
ProxyPassReverse / http://172.20.11.13/
ProxyPreserveHost on
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment