server { listen 80 defaultserver; listen [::]:80 defaultserver ipv6only=on; listen 443 ssl; root /var/www/html/monsite; index index.html index.htm; server_name monsite.fr; ssl_certificate /etc/nginx/ssl/monsite.fr.crt; ssl_certificate_key /etc/nginx/ssl/monsite.fr.key; location / { try_files $uri $uri/ =404; } }