Installer/Updater
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

109 lines
4.0 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. ##
  2. # You should look at the following URL's in order to grasp a solid understanding
  3. # of Nginx configuration files in order to fully unleash the power of Nginx.
  4. # https://www.nginx.com/resources/wiki/start/
  5. # https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
  6. # https://wiki.debian.org/Nginx/DirectoryStructure
  7. #
  8. # In most cases, administrators will remove this file from sites-enabled/ and
  9. # leave it as reference inside of sites-available where it will continue to be
  10. # updated by the nginx packaging team.
  11. #
  12. # This file will automatically load configuration files provided by other
  13. # applications, such as Drupal or Wordpress. These applications will be made
  14. # available underneath a path with that package name, such as /drupal8.
  15. #
  16. # Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
  17. ##
  18. # Default server configuration
  19. #
  20. server {
  21. listen 80 default_server;
  22. listen [::]:80 default_server;
  23. client_max_body_size 400M;
  24. # SSL configuration
  25. #
  26. #listen 443 ssl default_server;
  27. #listen [::]:443 ssl default_server;
  28. #add_header Strict-Transport-Security "max-age=0;";
  29. #add_header X-XSS-Protection "0";
  30. #add_header X-XSS-Protection "1; mode=block";
  31. #add_header X-Frame-Options "SAMEORIGIN";
  32. #add_header X-Content-Type-Options nosniff;
  33. #
  34. # Note: You should disable gzip for SSL traffic.
  35. # See: https://bugs.debian.org/773332
  36. #
  37. # Read up on ssl_ciphers to ensure a secure configuration.
  38. # See: https://bugs.debian.org/765782
  39. #
  40. # Self signed certs generated by the ssl-cert package
  41. # Don't use them in a production server!
  42. #
  43. #include /srv/etc/nginx/self-signed.conf;
  44. #include /srv/etc/nginx/ssl-params.conf;
  45. root /srv/www/web;
  46. # Add index.php to the list if you are using PHP
  47. index index.html index.htm index.nginx-debian.html;
  48. server_name _;
  49. location / {
  50. # First attempt to serve request as file, then
  51. # as directory, then fall back to displaying a 404.
  52. try_files $uri $uri/ =404;
  53. index index.html index.php;
  54. }
  55. # pass PHP scripts to FastCGI server
  56. #
  57. location ~ \.php$ {
  58. #keepalive_timeout 0;
  59. include snippets/fastcgi-php.conf;
  60. #fastcgi_hide_header X-Frame-Options;
  61. fastcgi_pass unix:/run/php/php-fpm.sock;
  62. }
  63. # deny access to .htaccess files, if Apache's document root
  64. # concurs with nginx's one
  65. #
  66. location ~* /jsapi_dynamic/.+\.js$ {
  67. include snippets/fastcgi-php.conf;
  68. fastcgi_pass unix:/run/php/php-fpm.sock;
  69. }
  70. location /video_feed/ {
  71. proxy_pass http://127.0.0.1:8972;
  72. proxy_set_header Host $host;
  73. proxy_set_header X-Real-IP $remote_addr;
  74. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  75. proxy_connect_timeout 20s; # time to open a connection to the proxy before we give up
  76. proxy_send_timeout 20s; # timeout for transmitting a request to the proxied server
  77. proxy_read_timeout 20s; # timeout for reading a response from the proxied server - did it send back anything before this has expired
  78. send_timeout 20s; # timeout for sending a response to the requesting client - note this isn't proxy_send_timeout, but the time between two successive write operations to the requesting client (ie. browser)
  79. reset_timedout_connection on;
  80. }
  81. location /video_view/ {
  82. proxy_pass http://127.0.0.1:8974;
  83. proxy_set_header Host $host;
  84. proxy_set_header X-Real-IP $remote_addr;
  85. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  86. proxy_connect_timeout 20s; # time to open a connection to the proxy before we give up
  87. proxy_send_timeout 20s; # timeout for transmitting a request to the proxied server
  88. proxy_read_timeout 20s; # timeout for reading a response from the proxied server - did it send back anything before this has expired
  89. send_timeout 20s; # timeout for sending a response to the requesting client - note this isn't proxy_send_timeout, but the time between two successive write operations to the requesting client (ie. browser)
  90. reset_timedout_connection on;
  91. }
  92. location ~ /\.ht {
  93. deny all;
  94. }
  95. }