Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- BEFORE: "Setting OpenVPN Debian"[https://pastebin.com/HFbRhGWm]
- $ sudo a2enmod proxy proxy_http proxy_connect
- $ sudo nano /etc/apache2/mods-enabled/proxy.conf
- #####
- <IfModule mod_proxy.c>
- # If you want to use apache2 as a forward proxy, uncomment the
- # 'ProxyRequests On' line and the <Proxy *> block below.
- # WARNING: Be careful to restrict access inside the <Proxy *> block.
- # Open proxy servers are dangerous both to your network and to the
- # Internet at large.
- #
- # If you only want to use apache2 as a reverse proxy/gateway in
- # front of some web application server, you DON'T need
- # 'ProxyRequests On'.
- # ProxyRequests On
- ProxyRequests Off
- <Proxy *>
- AddDefaultCharset off
- # Require all denied
- Order deny,allow
- Allow from all
- #Require local
- </Proxy>
- ProxyPass /yourapp/ http://10.8.0.6/yourapp/
- ProxyPassReverse /yourapp/ http://10.8.0.6/yourapp/
- <Location /yourapp/ >
- ProxyPassReverse /
- Order deny,allow
- Allow from all
- </Location>
- # Header edit Location ^http://10.8.0.6/yourapp/ https://10.8.0.6/yourapp/
- # Enable/disable the handling of HTTP/1.1 "Via:" headers.
- # ("Full" adds the server version; "Block" removes all outgoing Via: headers)
- # Set to one of: Off | On | Full | Block
- #ProxyVia Off
- </IfModule>
- # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
- #####
- $ sudo systemctl restart apache2
Add Comment
Please, Sign In to add comment