proxies / reverseproxy: Try and clean up logic and whitespace.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
parent
bf979b32ba
commit
7e90378b30
1 changed files with 38 additions and 36 deletions
|
@ -18,9 +18,10 @@ ProxyPreserveHost On
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if balancer_name is defined %}
|
{% if balancer_name is defined %}
|
||||||
# This is using openshift or another thing we want to balance in httpd
|
# This is something that wants a apache balancer
|
||||||
{% if targettype == 'openshift' or if ( 'iad2' in inventory_hostname and ocp4|bool ) %}
|
{% if 'iad2' in inventory_hostname %}
|
||||||
# This is a openshift3 app on a proxy anywhere, or a openshift4 one only in iad2
|
# This proxy is in iad2 and so we setup the balancer.
|
||||||
|
# Non iad2 proxies just send a 421 for this application to avoid firefox h2 reuse bug
|
||||||
SSLProxyEngine On
|
SSLProxyEngine On
|
||||||
|
|
||||||
{% if targettype is defined and targettype == "openshift" %}
|
{% if targettype is defined and targettype == "openshift" %}
|
||||||
|
@ -72,12 +73,13 @@ RewriteRule .* "balancer://{{ balancer_name }}-websocket%{REQUEST_URI}" [P]
|
||||||
</Proxy>
|
</Proxy>
|
||||||
ProxyPass {{ localpath }} "balancer://{{balancer_name}}{{remotepath}}"
|
ProxyPass {{ localpath }} "balancer://{{balancer_name}}{{remotepath}}"
|
||||||
ProxyPassReverse {{ localpath }} "balancer://{{balancer_name}}{{remotepath}}"
|
ProxyPassReverse {{ localpath }} "balancer://{{balancer_name}}{{remotepath}}"
|
||||||
{% elif ocp4|bool and not 'iad2' in inventory_hostname %}
|
{% else %}
|
||||||
# This is a non iad2 proxy and an openshift4 app
|
# This is a non iad2 proxy and an app that only exists in iad2
|
||||||
# We do this to avoid a h2 connection reuse bug by firefox.
|
# We do this to avoid a h2 connection reuse bug by firefox.
|
||||||
Redirect 421 /
|
Redirect 421 /
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% else %}
|
{% else %}
|
||||||
|
# This is an application that just goes to one url, not a balancer
|
||||||
ProxyPass {{ localpath }} {{ proxyurl }}{{remotepath}} {{ proxyopts }}
|
ProxyPass {{ localpath }} {{ proxyurl }}{{remotepath}} {{ proxyopts }}
|
||||||
ProxyPassReverse {{ localpath }} {{ proxyurl }}{{remotepath}}
|
ProxyPassReverse {{ localpath }} {{ proxyurl }}{{remotepath}}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue