mirror of
https://github.com/cloudpanel-io/vhost-templates.git
synced 2026-05-18 16:33:30 +08:00
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:
committed by
GitHub
parent
43f32c028e
commit
8ed836780e
@@ -15,18 +15,7 @@ server {
|
|||||||
rewrite ^ https://$host$uri permanent;
|
rewrite ^ https://$host$uri permanent;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ /.well-known {
|
location @reverse_proxy {
|
||||||
auth_basic off;
|
|
||||||
allow all;
|
|
||||||
}
|
|
||||||
|
|
||||||
{{settings}}
|
|
||||||
|
|
||||||
add_header Cache-Control no-transform;
|
|
||||||
|
|
||||||
index index.html;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
proxy_pass {{reverse_proxy_url}};
|
proxy_pass {{reverse_proxy_url}};
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header X-Forwarded-Host $host;
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
@@ -47,4 +36,20 @@ server {
|
|||||||
proxy_busy_buffers_size 256k;
|
proxy_busy_buffers_size 256k;
|
||||||
proxy_temp_file_write_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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user