Advertisement
jracing

another nginx shinobi config

Dec 16th, 2021
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. # no monitors display in shinobi
  2. server {
  3. listen 443 ssl;
  4. listen [::]:443 ssl;
  5.  
  6. server_name cctv.*;
  7.  
  8. # include /config/nginx/ssl.conf;
  9.  
  10. client_max_body_size 0;
  11.  
  12.  
  13. location / {
  14.  
  15. # include /config/nginx/proxy.conf;
  16. resolver 127.0.0.11 valid=30s;
  17. set $upstream_app 192.168.1.245;
  18. set $upstream_port 8080;
  19. set $upstream_proto http;
  20. proxy_pass $upstream_proto://$upstream_app:$upstream_port;
  21. proxy_set_header Upgrade $http_upgrade;
  22. proxy_set_header Connection "upgrade";
  23. proxy_set_header Host $host;
  24.  
  25.  
  26. proxy_set_header X-Real-IP $remote_addr;
  27. proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
  28. proxy_set_header X-Forward-Proto http;
  29. proxy_set_header X-Nginx-Proxy true;
  30. proxy_redirect off;
  31.  
  32.  
  33. }
  34. #this where socket io will be handling the request
  35. location /socket.io/ {
  36. resolver 127.0.0.11 valid=30s;
  37. proxy_http_version 1.1;
  38. proxy_set_header Upgrade $http_upgrade;
  39. proxy_set_header Connection "upgrade";
  40. proxy_pass "http://192.168.1.245:8080/socket.io/";
  41. }
  42.  
  43. # Optional redirect server errors to organizr error pages
  44. #error_page 400 402 403 404 405 408 500 502 503 504 $scheme://$host/?error=$status;
  45.  
  46.  
  47. ssl_certificate /etc/letsencrypt/live/cctv.mydomain.com/fullchain.pem; # managed by Certbot
  48. ssl_certificate_key /etc/letsencrypt/live/cctv.mydomain.com/privkey.pem; # managed by Certbot
  49. }
  50.  
  51.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement