scripts/nginx_config_maker/prod/lxc_containers/unbecetdesailes

62 lines
1.5 KiB
Plaintext
Raw Normal View History

2023-06-15 19:42:12 +02:00
server {
server_name unbecetdesailes.fr;
# enforce https
return 301 https://www.unbecetdesailes.fr$request_uri;
2023-06-27 10:28:46 +02:00
listen [::]:443 ;
listen 443 ;
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
2023-06-15 19:42:12 +02:00
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 / {
2023-06-27 10:28:46 +02:00
try_files $uri $uri/ /index.php?$args;
2023-06-15 19:42:12 +02:00
}
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=()";
}
2023-06-27 10:28:46 +02:00
2023-06-15 19:42:12 +02:00
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=()";
}