server { listen 443 ssl; listen [::]:443 ssl; server_name samuel-campos.fr; # Configure secure access. ssl_certificate /etc/letsencrypt/live/samuel-campos.fr/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/samuel-campos.fr/privkey.pem; include /etc/letsencrypt/options-ssl-nginx.conf; ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; # Redirect to homepage. return 301 https://www.netoik.io$request_uri; } server { listen 80; listen [::]:80; server_name samuel-campos.fr; # Let access to certbot challenge files. location /.well-known/acme-challenge/ { root /var/www/; } # Redirect to homepage. return 301 https://www.netoik.io$request_uri; }