Files
runtipi-appstore/apps/nginx/data/conf.d/default.conf
Gui-Gos 2a6946cac4
Some checks failed
Test / test (push) Has been cancelled
Renovate / renovate (push) Has been cancelled
refactor(nginx): single www volume with html/ subdirectory
- Removed separate html volume, use /var/www as single web root
- Moved html/ content into www/html/
- Updated default.conf root to /var/www/html
- Allows organizing multiple sites under /var/www (html, mon_site, etc.)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 14:39:43 +01:00

43 lines
1.1 KiB
Plaintext

server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /var/www/html;
index index.html index.htm;
# Headers de securite
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
# Rate limiting (burst de 20 requetes autorise)
limit_req zone=general burst=20 nodelay;
location / {
try_files $uri $uri/ =404;
}
# Desactiver l'acces aux fichiers caches
location ~ /\. {
deny all;
access_log off;
log_not_found off;
}
# Cache pour les fichiers statiques
# Note: on utilise uniquement "expires" ici pour ne pas ecraser
# les headers de securite du bloc server (comportement add_header de nginx)
location ~* \.(jpg|jpeg|png|gif|ico|css|js|pdf|txt|woff|woff2|ttf|svg)$ {
expires 7d;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www/html;
}
}