mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-10-23 20:23:45 +00:00
Some paths rendered host configs without fully loading the relations the templates depend on, silently dropping access rules (and SSL): - Enabling a proxy host loaded the access list without its clients or auth items, so the host came back with no access restrictions. - Requesting a Let's Encrypt certificate re-rendered every host sharing its domains from bare rows, dropping access rules and SSL. generateConfig now loads any referenced certificate or access list that isn't fully loaded, so no caller can render a partial config. The two callers above also fetch the relations themselves, and a warning is logged when a host's access list is missing or has no rules. Adds integration tests covering access lists across disable/enable. Fixes #5919, #4286, #5710 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
29 lines
706 B
Text
29 lines
706 B
Text
server {
|
|
listen 80;
|
|
server_name website1.example.com website2.example.com website3.example.com website4.example.com;
|
|
root /www;
|
|
index index.html;
|
|
|
|
# redirect requests for .html URLs to their extensionless form
|
|
if ($request_uri ~ ^/index\.html(\?.*)?$) {
|
|
return 301 /$1;
|
|
}
|
|
if ($request_uri ~ ^/(.+)\.html(\?.*)?$) {
|
|
return 301 /$1$2;
|
|
}
|
|
|
|
location / {
|
|
try_files $uri $uri.html $uri/ =404;
|
|
}
|
|
|
|
error_page 404 /404.html;
|
|
location = /404.html {
|
|
internal;
|
|
}
|
|
|
|
# deny access to .htaccess files, if Apache's document root
|
|
# concurs with nginx's one
|
|
location ~ /\.ht {
|
|
deny all;
|
|
}
|
|
}
|