woodburn/nginx.conf

31 lines
566 B
Nginx Configuration File
Raw Normal View History

2023-09-30 12:36:11 +10:00
server {
listen 80;
listen [::]:80;
server_name localhost;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri.html $uri/ =404;
}
location ~ /\.git {
deny all;
access_log off;
log_not_found off;
}
2023-09-30 12:53:56 +10:00
location ~* (nginx.conf|Dockerfile|cleanup.ps1|cleanup.bat|README.md|LICENSE.md) {
deny all;
}
2023-09-30 12:36:11 +10:00
# Custom 404 page
error_page 404 /404.html;
2023-09-30 12:43:46 +10:00
root /usr/share/nginx/html;
2023-09-30 12:36:11 +10:00
location = /404.html {
}
}