Advertisement
Guest User

Untitled

a guest
Apr 8th, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. server {
  2. listen 80;
  3. listen [::]:80;
  4.  
  5. server_name cloud.mydomain.com;
  6. # Redirect all HTTP requests to HTTPS with a 301 Moved Permanently response.
  7. return 301 https://cloud.mydomain.com$request_uri;
  8. }
  9.  
  10. server {
  11. listen 443 ssl http2;
  12. listen [::]:443 ssl http2;
  13.  
  14. server_name cloud.mydomain.com;
  15.  
  16. # certs sent to the client in SERVER HELLO are concatenated in ssl_certificate
  17. ssl_certificate /etc/letsencrypt/live/my domain.com/fullchain.pem;
  18. ssl_certificate_key /etc/letsencrypt/live/my domain.com/privkey.pem;
  19. ssl_session_timeout 1d;
  20. ssl_session_cache shared:SSL:50m;
  21. ssl_session_tickets off;
  22.  
  23. # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
  24. ssl_dhparam /etc/ssl/certs/dhparam.pem;
  25.  
  26. # intermediate configuration. tweak to your needs.
  27. ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  28. ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-$
  29. ssl_prefer_server_ciphers on;
  30.  
  31. # HSTS (ngx_http_headers_module is required) (15768000 seconds = 6 months)
  32. add_header Strict-Transport-Security max-age=15768000;
  33.  
  34. # OCSP Stapling ---
  35. # fetch OCSP records from URL in ssl_certificate and cache them
  36. ssl_stapling on;
  37. ssl_stapling_verify on;
  38.  
  39. ## verify chain of trust of OCSP response using Root CA and Intermediate certs
  40. ssl_trusted_certificate /etc/letsencrypt/live/my domain.com/fullchain.pem;
  41.  
  42.  
  43.  
  44. # location / {
  45. # proxy_set_header Host $host;
  46. # proxy_set_header X-Real-IP $remote_addr;
  47. # proxy_pass http://192.168.0.10:8110/;
  48. # }
  49.  
  50. location / {
  51. proxy_set_header Host $host;
  52. proxy_set_header X-Real-IP $remote_addr;
  53. proxy_pass http://192.168.0.78:8000/;
  54. }
  55.  
  56.  
  57. location /seafhttp {
  58. proxy_set_header Host $host;
  59. proxy_set_header X-Real-IP $remote_addr;
  60. rewrite ^/seafhttp(.*)$ $1 break;
  61. proxy_pass http://192.168.0.78:8082;
  62. client_max_body_size 0;
  63.  
  64. }
  65.  
  66.  
  67. location /seafdav {
  68. proxy_set_header Host $host;
  69. proxy_set_header X-Real-IP $remote_addr;
  70. proxy_pass http://192.168.0.78:8080/seafdav;
  71.  
  72. }
  73.  
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement