# signature.beziers-mediterranee.fr — derrière Nginx Proxy Manager (TLS terminé par NPM). # Modèle traité au démarrage par l'image nginx officielle (envsubst des seules variables définies) : # NGINX_REAL_IP_FROM : réseau d'où viennent les requêtes de NPM (ex. 172.18.0.0/16) server { listen 80; server_name _; # IP réelle du client transmise par NPM (sinon /admin verrait l'IP de NPM) set_real_ip_from ${NGINX_REAL_IP_FROM}; real_ip_header X-Forwarded-For; real_ip_recursive on; server_tokens off; client_max_body_size 6m; add_header X-Content-Type-Options "nosniff" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always; root /var/www/html/public; index index.php; # Add-in Outlook : chargé en iframe par Outlook, donc AUCUN X-Frame-Options ici. location /addin/ { alias /srv/addin/; add_header X-Content-Type-Options "nosniff" always; add_header Cache-Control "no-cache" always; try_files $uri =404; } # Logos et bannières : publics, mis en cache par les clients location /img/ { alias /var/www/html/public/img/; expires 7d; add_header Cache-Control "public" always; add_header Access-Control-Allow-Origin "*" always; try_files $uri =404; } # Back-office : réseaux internes uniquement (IP réelle, voir set_real_ip_from) location /admin { include /etc/nginx/conf.d/admin-allow.inc; deny all; add_header X-Frame-Options "DENY" always; try_files $uri $uri/ /index.php?$query_string; } location / { add_header X-Frame-Options "DENY" always; try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { fastcgi_pass signature_app:9000; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; include fastcgi_params; fastcgi_hide_header X-Powered-By; } location ~ /\.(?!well-known) { deny all; } }