scripts/nginx_config_maker/prod/lxc_containers/clairelemoine.art

87 lines
2.6 KiB
Plaintext
Raw Normal View History

2023-06-15 19:42:12 +02:00
server {
listen 80;
if ($host = www.clairelemoine.art) {
return 301 https://$host$request_uri;
} # managed by Certbot
if ($host = clairelemoine.art) {
return 301 https://www.$host$request_uri;
} # managed by Certbot
server_name www.clairelemoine.art;
# enforce https
return 301 https://$server_name$request_uri;
add_header Permissions-Policy "interest-cohort=()";
#listen [::]:443 ssl ipv6only=on; # managed by Certbot
#listen 443 ssl; # managed by Certbot
#ssl_certificate /etc/letsencrypt/live/www.clairelemoine.art/fullchain.pem; # managed by Certbot
#ssl_certificate_key /etc/letsencrypt/live/www.clairelemoine.art/privkey.pem; # managed by Certbot
#include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
#ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
access_log /var/log/nginx/access-clairelemoine.log combined;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.clairelemoine.art clairelemoine.art;
ssl_certificate /etc/letsencrypt/live/www.clairelemoine.art/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/www.clairelemoine.art/privkey.pem; # managed by Certbot
# Path to the root of your installation
root /home/www/wulfila;
index index.html index.php;
gzip on;
gzip_disable "msie6";
include /etc/nginx/mime.types;
## This should be in your http block and if it is, it's not needed here.
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 on;
}
rewrite_log on;
add_header Permissions-Policy "interest-cohort=()";
access_log /var/log/nginx/access-clairelemoine.log;
error_log /var/log/nginx/error-clairelemoine.log debug;
}