scripts/nginx_config_maker/prod/lxc_containers/unbecetdesailes

62 lines
1.5 KiB
Plaintext

server {
server_name unbecetdesailes.fr;
# enforce https
return 301 https://www.unbecetdesailes.fr$request_uri;
listen [::]:443 ;
listen 443 ;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
add_header Permissions-Policy "interest-cohort=()";
}
server {
listen 443 http2;
listen [::]:443 http2;
server_name www.unbecetdesailes.fr;
root /home/www/unbecetdesailes/wordpress;
index index.php;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
#NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
include fastcgi.conf;
fastcgi_intercept_errors on;
fastcgi_pass php-handler;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires max;
log_not_found off;
}
add_header Permissions-Policy "interest-cohort=()";
}
server {
if ($host = pucealoreille.fr) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
listen [::]:80;
server_name unbecetdesailes.fr;
return 404; # managed by Certbot
add_header Permissions-Policy "interest-cohort=()";
}