✨ Enable setup-http-site-proxy with missing proxy target
If no proxy port is defined, only the dehydrated HTTP endpoint is created and the HTTPS endpoint returns 404.
This commit is contained in:
parent
c4af7754b2
commit
e3020b6d71
1 changed files with 4 additions and 0 deletions
|
@ -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]
|
||||
</ifmodule>
|
||||
<% else %>
|
||||
Redirect 404 /
|
||||
< %endif %>
|
||||
</VirtualHost>
|
||||
</IfFile>
|
||||
</IfFile>
|
||||
|
|
Loading…
Reference in a new issue