75 lines
2.3 KiB
Plaintext
75 lines
2.3 KiB
Plaintext
|
server {
|
||
|
server_name coussinet.org ;
|
||
|
# enforce https
|
||
|
return 301 https://www.coussinet.org$request_uri;
|
||
|
|
||
|
listen [::]:443; # managed by Certbot
|
||
|
listen 443 ssl; # managed by Certbot
|
||
|
|
||
|
ssl_certificate /etc/letsencrypt/live/coussinet.org/fullchain.pem; # managed by Certbot
|
||
|
ssl_certificate_key /etc/letsencrypt/live/coussinet.org/privkey.pem; # managed by Certbot
|
||
|
|
||
|
add_header Permissions-Policy "interest-cohort=()";
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 443 ssl http2;
|
||
|
listen [::]:443 ssl http2;
|
||
|
server_name www.coussinet.org;
|
||
|
|
||
|
# Use Mozilla's guidelines for SSL/TLS settings
|
||
|
# https://mozilla.github.io/server-side-tls/ssl-config-generator/
|
||
|
# NOTE: some settings below might be redundant
|
||
|
ssl_certificate /etc/letsencrypt/live/coussinet.org/fullchain.pem; # managed by Certbot
|
||
|
ssl_certificate_key /etc/letsencrypt/live/coussinet.org/privkey.pem; # managed by Certbot
|
||
|
|
||
|
# Path to the root of your installation
|
||
|
root /home/www/coussinet;
|
||
|
|
||
|
## This should be in your http block and if it is, it's not needed here.
|
||
|
index index.php index.html;
|
||
|
|
||
|
location = /favicon.ico {
|
||
|
log_not_found off;
|
||
|
access_log off;
|
||
|
}
|
||
|
|
||
|
location = /robots.txt {
|
||
|
allow all;
|
||
|
log_not_found off;
|
||
|
access_log off;
|
||
|
}
|
||
|
|
||
|
location / {
|
||
|
# This is cool because no php is touched for static content.
|
||
|
# include the "?$args" part so non-default permalinks doesn't break when using query string
|
||
|
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 coussinet.org;
|
||
|
return 404; # managed by Certbot
|
||
|
|
||
|
add_header Permissions-Policy "interest-cohort=()";
|
||
|
}
|