epcim
10/20/2015 - 8:54 AM

apache-reverse-proxy.howto.md

Apache reverse proxy - basics

http://www.apachetutor.org/admin/reverseproxies

Note: ProxyPassReverse reverzne prepise jen URL v hlavice stranky, Tj. aplikace potom but musi generovat vsechny odkazy relativne od BASE_URI. Nebo je treba pouzit mod_proxy_html: http://httpd.apache.org/docs/current/mod/mod_proxy_html.html (ktery prepise klidne i linky a odkazy vne HTML dokumentu)

<VirtualHost :443>

    ServerName <server url>
    SSLEngine on
    SSLCertificateFile /etc/ssl/localcerts/<certname>.crt
    SSLCertificateKeyFile /etc/ssl/localcerts/<keyname>.key
<Proxy *>
    Order deny,allow
    Allow from all
</Proxy>

SSLProxyEngine on
ProxyRequests Off
ProxyPass / https://<url>:4443/
ProxyPassReverse / https://<url>/

Header edit Location ^http://<url>/ https://<url>/
RequestHeader set X-Forwarded-Proto "https"

ProxyPass lze davat i nejake argumenty

ProxyPass /redmine-vsm2 https://10.20.30.131/redmine-vsm2 retry=0 timeout=5 ProxyPassReverse /redmine-vsm2 https://10.20.30.131/redmine-vsm2

Toto jsem pridal, nebot jsme meli nejake problemy z IE

SetEnvIf User-Agent ".MSIE."
nokeepalive ssl-unclean-shutdown
downgrade-1.0 force-response-1.0