|
| 1 | +# You may add here your |
| 2 | +# server { |
| 3 | +# ... |
| 4 | +# } |
| 5 | +# statements for each of your virtual hosts to this file |
| 6 | + |
| 7 | +## |
| 8 | +# You should look at the following URL's in order to grasp a solid understanding |
| 9 | +# of Nginx configuration files in order to fully unleash the power of Nginx. |
| 10 | +# http://wiki.nginx.org/Pitfalls |
| 11 | +# http://wiki.nginx.org/QuickStart |
| 12 | +# http://wiki.nginx.org/Configuration |
| 13 | +# |
| 14 | +# Generally, you will want to move this file somewhere, and start with a clean |
| 15 | +# file but keep this around for reference. Or just disable in sites-enabled. |
| 16 | +# |
| 17 | +# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples. |
| 18 | +## |
| 19 | + |
| 20 | +server { |
| 21 | + listen 443 ssl; |
| 22 | + server_name loglist.net; |
| 23 | + keepalive_timeout 60; |
| 24 | + ssl_certificate /etc/letsencrypt/live/loglist.net/fullchain.pem; |
| 25 | + ssl_certificate_key /etc/letsencrypt/live/loglist.net/privkey.pem; |
| 26 | + ssl_protocols TLSv1 TLSv1.1 TLSv1.2; |
| 27 | + ssl_ciphers "HIGH:!aNULL:!MD5:!kEDH"; |
| 28 | + add_header Strict-Transport-Security 'max-age=15552000'; |
| 29 | + |
| 30 | + location / { |
| 31 | + proxy_set_header X-Forwarded-Host $host; |
| 32 | + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
| 33 | + proxy_set_header X-Forwarded-Proto $scheme; |
| 34 | + proxy_set_header Host loglist.net; |
| 35 | + proxy_http_version 1.1; |
| 36 | + proxy_pass http://localhost:9000/; |
| 37 | + } |
| 38 | +} |
| 39 | + |
| 40 | + |
| 41 | +server { |
| 42 | + listen 80; |
| 43 | + server_name loglist.net; |
| 44 | + |
| 45 | + location / { |
| 46 | + rewrite ^(.*)$ https://loglist.net$1 permanent; |
| 47 | + } |
| 48 | +} |
| 49 | + |
| 50 | +server { |
| 51 | + listen 80; |
| 52 | + server_name *.loglist.net; |
| 53 | + location / { |
| 54 | + return 301 https://loglist.net$request_uri; |
| 55 | + } |
| 56 | +} |
0 commit comments