71 lines
2.2 KiB
Plaintext
71 lines
2.2 KiB
Plaintext
# signature.beziers-mediterranee.fr — certificat wildcard *.beziers-mediterranee.fr
|
|
server {
|
|
listen 80;
|
|
server_name signature.beziers-mediterranee.fr;
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
http2 on;
|
|
server_name signature.beziers-mediterranee.fr;
|
|
|
|
ssl_certificate /etc/nginx/certs/wildcard.beziers-mediterranee.fr.crt;
|
|
ssl_certificate_key /etc/nginx/certs/wildcard.beziers-mediterranee.fr.key;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_prefer_server_ciphers off;
|
|
ssl_session_cache shared:SSL:10m;
|
|
|
|
server_tokens off;
|
|
client_max_body_size 6m;
|
|
add_header Strict-Transport-Security "max-age=31536000" always;
|
|
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 Strict-Transport-Security "max-age=31536000" always;
|
|
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 : filtrage réseau en plus du SSO et du contrôle applicatif
|
|
location /admin {
|
|
# Adapter aux réseaux internes CABM
|
|
allow 10.0.0.0/8;
|
|
allow 172.16.0.0/12;
|
|
allow 192.168.0.0/16;
|
|
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 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; }
|
|
}
|