VPS-config/nginx/sites-available/creativecalc.conf

58 lines
1.2 KiB
Plaintext

server {
listen [::]:80;
listen *:80;
server_name creativecalc.fr www.creativecalc.fr;
include common.conf;
access_log /var/log/nginx/creativecalc_access.log;
error_log /var/log/nginx/creativecalc_error.log;
location / {
return 301 https://$server_name$request_uri;
}
}
server {
listen [::]:443 ssl http2;
listen *:443 ssl http2;
server_name creativecalc.fr;
include common.conf;
include ssl.conf;
ssl_certificate /etc/dehydrated/certs/creativecalc.fr/fullchain.pem;
ssl_certificate_key /etc/dehydrated/certs/creativecalc.fr/privkey.pem;
access_log /var/log/nginx/creativecalc_access.log;
error_log /var/log/nginx/creativecalc_error.log;
location / {
return 301 https://www.creativecalc.fr$request_uri;
}
}
server {
listen [::]:443 ssl http2;
listen *:443 ssl http2;
server_name www.creativecalc.fr;
include common.conf;
include ssl.conf;
ssl_certificate /etc/dehydrated/certs/creativecalc.fr/fullchain.pem;
ssl_certificate_key /etc/dehydrated/certs/creativecalc.fr/privkey.pem;
access_log /var/log/nginx/creativecalc_access.log;
error_log /var/log/nginx/creativecalc_error.log;
root /home/creativecalc/www;
location /assets/fonts {
expires 365d;
}
}