diff --git a/playbooks/groups/proxies-reverseproxy.yml b/playbooks/groups/proxies-reverseproxy.yml index 2dc07d36b3..15650bbd36 100644 --- a/playbooks/groups/proxies-reverseproxy.yml +++ b/playbooks/groups/proxies-reverseproxy.yml @@ -61,12 +61,12 @@ website: taskotron.stg.fedoraproject.org destname: taskotron # Talk directly to the app server, not haproxy - proxyurl: http://taskotron-stg01.qa.fedoraproject.org/ + proxyurl: http://taskotron-stg01.qa.fedoraproject.org - role: httpd/reverseproxy website: meetbot.fedoraproject.org destname: meetbot - localpath: /meetbot + remotepath: /meetbot/ # Talk directly to the app server, not haproxy proxyurl: http://value01 @@ -82,6 +82,7 @@ destname: nuancier localpath: /nuancier remotepath: /nuancier + header_scheme: true proxyurl: http://localhost:10035 - role: httpd/reverseproxy @@ -89,6 +90,7 @@ destname: github2fedmsg localpath: /github2fedmsg remotepath: /github2fedmsg + header_scheme: true proxyurl: http://localhost:10037 - role: httpd/reverseproxy diff --git a/roles/httpd/reverseproxy/templates/reversepassproxy.conf b/roles/httpd/reverseproxy/templates/reversepassproxy.conf index c79ddf9ea4..6fad6b3bc1 100644 --- a/roles/httpd/reverseproxy/templates/reversepassproxy.conf +++ b/roles/httpd/reverseproxy/templates/reversepassproxy.conf @@ -2,6 +2,8 @@ RewriteEngine On RewriteRule ^{{remotepath}}$ %{REQUEST_URI}/ [R=301] +{% endif %} +{% if header_scheme %}RequestHeader set X-Forwarded-Scheme https early {% endif %} ProxyPass {{ localpath }} {{ proxyurl }}{{remotepath}} ProxyPassReverse {{ localpath }} {{ proxyurl }}{{remotepath}} diff --git a/roles/httpd/reverseproxy/vars/main.yml b/roles/httpd/reverseproxy/vars/main.yml index 17df0b4878..61ee936ff3 100644 --- a/roles/httpd/reverseproxy/vars/main.yml +++ b/roles/httpd/reverseproxy/vars/main.yml @@ -1,4 +1,5 @@ remotepath: / localpath: / -rewrite: false destname: reversepassproxy +rewrite: false +header_scheme: false