Advertisement
Guest User

Untitled

a guest
Sep 10th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 1.25 KB | None | 0 0
  1. server {
  2.     listen      80;
  3.     listen [::]:80;
  4.     server_name example.com;
  5.  
  6.     location / {
  7.         rewrite ^ https://$host$request_uri? permanent;
  8.     }
  9.  
  10.     location ^~ /.well-known {
  11.         allow all;
  12.         root  /data/letsencrypt/;
  13.     }
  14. }
  15.  
  16.  
  17. server {
  18.     listen      443           ssl http2;
  19.     listen [::]:443           ssl http2;
  20.     server_name               example.com www.example.com;
  21.  
  22.     ssl                       on;
  23.  
  24.     add_header                Strict-Transport-Security "max-age=31536000" always;
  25.  
  26.     ssl_session_cache         shared:SSL:20m;
  27.     ssl_session_timeout       10m;
  28.  
  29.     ssl_protocols             TLSv1 TLSv1.1 TLSv1.2;
  30.     ssl_prefer_server_ciphers on;
  31.     ssl_ciphers               "ECDH+AESGCM:ECDH+AES256:ECDH+AES128:!ADH:!AECDH:!MD5;";
  32.  
  33.     ssl_stapling              on;
  34.     ssl_stapling_verify       on;
  35.     resolver                  8.8.8.8 8.8.4.4;
  36.  
  37.     ssl_certificate           /etc/letsencrypt/live/example.com/fullchain.pem;
  38.     ssl_certificate_key       /etc/letsencrypt/live/example.com/privkey.pem;
  39.     ssl_trusted_certificate   /etc/letsencrypt/live/example.com/chain.pem;
  40.  
  41.     access_log                /dev/stdout;
  42.     error_log                 /dev/stderr info;
  43.  
  44.     # other configs
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement