Files
nginx-proxy-manager/test/docker/nginx/conf.d/website123.conf
T
Jamie Curnow 2cfd3395cf Adds integration tests for per path access lists, fixes ipv6 jsv,
and enforces host-wide access list when location access list is not set
2026-09-24 12:21:49 +10:00

30 lines
685 B
Plaintext

server {
listen 80;
server_name website1.example.com website2.example.com website3.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;
}
}