From f9197221c8a5edcf119707c07173feb200360b73 Mon Sep 17 00:00:00 2001 From: Stefan Haun Date: Tue, 6 Sep 2022 15:35:50 +0200 Subject: [PATCH] :wrench: Setup Apache proxy pass for sites with invalid URIs This is a setup according to https://www.rabbitmq.com/management.html#proxy which solves a problem with RabbitMQ encoding vhost names in a non-standard way. As this setting does not hurt other sites, we can introduce it into the general template. --- .../templates/apache-docker-proxy-site.j2 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/roles/setup-http-site-proxy/templates/apache-docker-proxy-site.j2 b/roles/setup-http-site-proxy/templates/apache-docker-proxy-site.j2 index b6a81c3..b9f58a7 100644 --- a/roles/setup-http-site-proxy/templates/apache-docker-proxy-site.j2 +++ b/roles/setup-http-site-proxy/templates/apache-docker-proxy-site.j2 @@ -39,7 +39,8 @@ SSLCertificateKeyFile /usr/local/etc/dehydrated/certs/{{ site_name }}/privkey.pem SSLCertificateChainFile /usr/local/etc/dehydrated/certs/{{ site_name }}/chain.pem - ProxyPass / http://{{ backend_host | default("localhost") }}:{{proxy_port}}/ + AllowEncodedSlashes NoDecode + ProxyPass / http://{{ backend_host | default("localhost") }}:{{proxy_port}}/ nocanon RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} RequestHeader set "X-Forwarded-SSL" expr=%{HTTPS}