server { listen 80; server_name __pywallter_domain__; #Ajout pour les certificats letsencrypt include snippets/acme-challenge.conf; return 301 https://$http_host$request_uri; root /html/; } server { listen 443 ssl http2; server_name __pywallter_domain__; ssl_certificate /etc/ssl/__pywallter_domain__.crt; ssl_certificate_key /etc/ssl/private/__pywallter_domain__.key; #Ajout d'une configuration ssl securise include snippets/secure-ssl.conf; # Speeds things up a little bit when resuming a session # ssl_session_timeout 5m; # ssl_session_cache shared:SSL:5m; # Ajout pour le certificat letsencrypt include snippets/acme-challenge.conf; # Ajout pour securiser les headers include snippets/secure-headers.conf; client_max_body_size 100M; location / { proxy_pass http://127.0.0.1:8000/; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Prefix /; } # Path to the root of your installation root /html/; }