Update ReverseProxy

Allow `/.well-known/` routes to pass to the reverse proxy service if the file isn't available on disk. This allows Let's Encrypt HTTP challenge by CloudPanel while also allowing the service behind the reverse proxy to get it's own internal certificate or expose other `./well-known/` routes.
This commit is contained in:
Benjamin Schirmer
2024-01-05 12:27:12 +01:00
committed by GitHub
parent 43f32c028e
commit 8ed836780e

View File

@@ -15,18 +15,7 @@ server {
rewrite ^ https://$host$uri permanent;
}
location ~ /.well-known {
auth_basic off;
allow all;
}
{{settings}}
add_header Cache-Control no-transform;
index index.html;
location / {
location @reverse_proxy {
proxy_pass {{reverse_proxy_url}};
proxy_http_version 1.1;
proxy_set_header X-Forwarded-Host $host;
@@ -47,4 +36,20 @@ server {
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
}
}
{{settings}}
add_header Cache-Control no-transform;
index index.html;
location ^~ /.well-known {
auth_basic off;
allow all;
try_files $uri @reverse_proxy;
}
location / {
try_files $uri @reverse_proxy;
}
}