Skip to content
Snippets Groups Projects
httpd-frontend.conf.j2 921 B
Newer Older
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyRequests off

LoadModule rewrite_module modules/mod_rewrite.so
RewriteEngine on

{% for b in http_frontend_backends %}
ProxyPass /{{ b.name }}/ http://{{ http_frontend_hostname }}:{{ b.port }}/
RewriteRule ^/{{ b.name }}$ /{{ b.name }}/ [R]
{% endfor %}

LoadModule proxy_html_module modules/mod_proxy_html.so
LoadModule xml2enc_module modules/mod_xml2enc.so
Include conf/extra/proxy-html.conf

{% for b in http_frontend_backends %}
<Location /{{ b.name }}/>
    ProxyPassReverse /
    ProxyPassReverseCookiePath / /{{ b.name }}/

    ProxyHTMLURLMap / /{{ b.name }}/
</Location>
{% endfor %}

<Location />
    ProxyHTMLEnable On
{% for b in http_frontend_backends %}
    ProxyHTMLURLMap http://{{ http_frontend_hostname }}:{{ b.port }} /{{ b.name }}
{% endfor %}
    RequestHeader unset Accept-Encoding
</Location>