jracing

conf file for nginx - cctv

Dec 15th, 2021 (edited)
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.26 KB | None | 0 0
  1. # example reverseproxy for shinobi-cctv (provided by To-mos on reddit) - no monitors
  2. server {
  3. # reverse proxy for https ipv4&6
  4. listen 443 ssl;
  5. listen [::]:443 ssl;
  6. server_name cctv.*;
  7.  
  8. # include /etc/nginx/ssl.conf;
  9.  
  10. location / {
  11. proxy_set_header X-Real-IP $remote_addr;
  12. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  13. proxy_set_header Host $http_host;
  14. #proxy_set_header Host $host;
  15. proxy_set_header X-NginX-Proxy false;
  16.  
  17. proxy_pass http://192.168.1.245:8080;
  18. proxy_redirect off;
  19. }
  20.  
  21. # Requests for socket.io are passed on to Node
  22. location ~* \.io {
  23. proxy_set_header X-Real-IP $remote_addr;
  24. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  25. proxy_set_header Host $http_host;
  26. proxy_set_header X-NginX-Proxy false;
  27.  
  28. proxy_pass http://192.168.1.245:8080;
  29. proxy_redirect off;
  30.  
  31. # websocket specific
  32. proxy_http_version 1.1;
  33. proxy_set_header Upgrade $http_upgrade;
  34. proxy_set_header Connection "upgrade";
  35. }
  36.  
  37.  
  38. ssl_certificate /etc/letsencrypt/live/cctv.jewettracing.com/fullchain.pem; # managed by Certbot
  39. ssl_certificate_key /etc/letsencrypt/live/cctv.jewettracing.com/privkey.pem; # managed by Certbot
  40. }
  41.  
Add Comment
Please, Sign In to add comment