Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- listen [::]:80;
- server_name example.com;
- location / {
- rewrite ^ https://$host$request_uri? permanent;
- }
- location ^~ /.well-known {
- allow all;
- root /data/letsencrypt/;
- }
- }
- server {
- listen 443 ssl http2;
- listen [::]:443 ssl http2;
- server_name example.com www.example.com;
- ssl on;
- add_header Strict-Transport-Security "max-age=31536000" always;
- ssl_session_cache shared:SSL:20m;
- ssl_session_timeout 10m;
- ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
- ssl_prefer_server_ciphers on;
- ssl_ciphers "ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!ADH:!AECDH:!MD5;";
- ssl_stapling on;
- ssl_stapling_verify on;
- resolver 8.8.8.8 8.8.4.4;
- ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
- ssl_trusted_certificate /etc/letsencrypt/live/example.com/chain.pem;
- access_log /dev/stdout;
- error_log /dev/stderr info;
- # other configs
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement