The proxy pass feature is useful when you want to access internal sites from the outside network.
Proxy pass configuration must be done via command line.
Before proceed, make sure nethserver-httpd
package in installed:
yum install -y nethserver-httpd
Scenario:
Commands for this example:
db proxypass set mysite ProxyPass
db proxypass setprop mysite Target http://192.168.2.100
db proxypass setprop mysite Description "My internal server"
db proxypass setprop mysite HTTP on
db proxypass setprop mysite HTTPS on
signal-event nethserver-httpd-update
You can also restrict the access to a list of IPs:
db proxypass setprop mysite ValidFrom 88.88.00.0/24,78.22.33.44
signal-event nethserver-httpd-update
If this is not enough, you can always manually create your own proxy pass
by creating a new file inside /etc/httpd/conf.d/
directory.
Ejemplo
Crear archivo /etc/httpd/conf.d/myproxypass.conf
con este contenido:
<VirtualHost *:443>
SSLEngine On
SSLProxyEngine On
ProxyPass /owa https://myserver.exchange.org/
ProxyPassReverse /owa https://myserver.exchange.org/
</VirtualHost>
<VirtualHost *:80>
ServerName www.mydomain.org
ProxyPreserveHost On
ProxyPass / http://10.10.1.10/
ProxyPassReverse / http://10.10.1.10/
</VirtualHost>
Consulte la documentación oficial de Apache para obtener más información: http://httpd.apache.org/docs/2.2/mod/mod_proxy.html