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 55dc711..022b0e2 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,6 +39,7 @@ SSLCertificateKeyFile {{dehydrated_certs_dir}/{{ site_name }}/privkey.pem SSLCertificateChainFile {{dehydrated_certs_dir}/{{ site_name }}/chain.pem +<% if proxy_port %> AllowEncodedSlashes NoDecode ProxyPass / http://{{ backend_host | default("localhost") }}:{{proxy_port}}/ nocanon RequestHeader set "X-Forwarded-Proto" expr=%{REQUEST_SCHEME} @@ -51,6 +52,9 @@ RewriteCond %{HTTP:Connection} upgrade [NC] RewriteRule ^/?(.*) "ws://{{ backend_host | default("localhost") }}:{{ proxy_port }}/$1" [P,L] +<% else %> + Redirect 404 / +< %endif %>