Guest User

Untitled

a guest
Jul 18th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.84 KB | None | 0 0
  1. server {
  2. client_max_body_size 100M;
  3. listen 80;
  4. server_name f.com;
  5.  
  6. location / {
  7. proxy_pass http://localhost:3005;
  8. proxy_http_version 1.1;
  9. proxy_set_header Upgrade $http_upgrade;
  10. proxy_set_header Connection 'upgrade';
  11. proxy_set_header Host $host;
  12. proxy_cache_bypass $http_upgrade;
  13. # First attempt to serve request as file, then
  14. # as directory, then fall back to displaying a 404.
  15. # try_files $uri $uri/ =404;
  16. }
  17.  
  18. listen 443 ssl; # managed by Certbot
  19. ssl_certificate /etc/letsencrypt/live/f.com/fullchain.pem; # managed by Certbot
  20. ssl_certificate_key /etc/letsencrypt/live/f.com/privkey.pem; # managed by Certbot
  21. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  22. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  23.  
  24.  
  25. if ($scheme != "https") {
  26. return 301 https://$host$request_uri;
  27. } # managed by Certbot
  28.  
  29. }
  30.  
  31. server {
  32. listen 80;
  33. server_name s.com;
  34.  
  35. location / {
  36. proxy_pass http://localhost:3006;
  37. proxy_http_version 1.1;
  38. proxy_set_header Upgrade $http_upgrade;
  39. proxy_set_header Connection 'upgrade';
  40. proxy_set_header Host $host;
  41. proxy_cache_bypass $http_upgrade;
  42. # First attempt to serve request as file, then
  43. # as directory, then fall back to displaying a 404.
  44. # try_files $uri $uri/ =404;
  45. # deny all;
  46. }
  47.  
  48. listen 443 ssl; # managed by Certbot
  49. ssl_certificate /etc/letsencrypt/live/s.com/fullchain.pem; # managed by Certbot
  50. ssl_certificate_key /etc/letsencrypt/live/s.com/privkey.pem; # managed by Certbot
  51. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  52. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  53.  
  54. # Redirect non-https traffic to https
  55. if ($scheme != "https") {
  56. return 301 https://$host$request_uri;
  57. } # managed by Certbot
  58.  
  59. }
Add Comment
Please, Sign In to add comment