Advertisement
Guest User

Untitled

a guest
Feb 18th, 2020
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.77 KB | None | 0 0
  1. server {
  2. server_name kiwiirc.hybridirc.com;
  3. access_log off;
  4.  
  5. location / {
  6. index index.html;
  7. root /usr/share/kiwiirc/;
  8.  
  9. }
  10.  
  11. location /webirc/ {
  12. # Forward incoming requests to local webircgateway socket
  13. proxy_pass http://localhost:8090/webirc/;
  14.  
  15. # Set http version and headers
  16. proxy_http_version 1.1;
  17. proxy_set_header X-Forwarded-For $remote_addr;
  18.  
  19. # Allow upgrades to websockets
  20. proxy_set_header Upgrade $http_upgrade;
  21. proxy_set_header Connection "upgrade";
  22.  
  23. }
  24.  
  25. location /files/ {
  26. # Forward incoming requests to local fileupload instance
  27. proxy_pass http://127.0.0.1:8088/files/;
  28.  
  29. # Disable request and response buffering
  30. proxy_request_buffering off;
  31. proxy_buffering off;
  32. proxy_http_version 1.1;
  33.  
  34. # Add X-Forwarded-* headers
  35. proxy_set_header X-Forwarded-Host $host;
  36. proxy_set_header X-Forwarded-Proto $scheme;
  37. proxy_set_header X-Forwarded-For $remote_addr;
  38.  
  39. # Allow upgrades to websockets
  40. proxy_set_header Upgrade $http_upgrade;
  41. proxy_set_header Connection "upgrade";
  42. client_max_body_size 0;
  43.  
  44. }
  45. listen 443 ssl; # managed by Certbot
  46. ssl_certificate /etc/letsencrypt/live/kiwiirc.hybridirc.com/fullchain.pem; # managed by Certbot
  47. ssl_certificate_key /etc/letsencrypt/live/kiwiirc.hybridirc.com/privkey.pem; # managed by Certbot
  48. include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
  49. ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  50.  
  51.  
  52.  
  53. }
  54. server {
  55. if ($host = kiwiirc.hybridirc.com) {
  56. return 301 https://$host$request_uri;
  57. } # managed by Certbot
  58.  
  59.  
  60. listen 80;
  61. server_name kiwiirc.hybridirc.com;
  62. return 404; # managed by Certbot
  63.  
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement