Advertisement
beqa1923

Untitled

Aug 23rd, 2019
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. # For more information on configuration, see:
  2. # * Official English Documentation: http://nginx.org/en/docs/
  3. # * Official Russian Documentation: http://nginx.org/ru/docs/
  4.  
  5.  
  6. user nginx;
  7. worker_processes auto;
  8. error_log /var/log/nginx/error.log;
  9. pid /run/nginx.pid;
  10.  
  11.  
  12. # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
  13. include /usr/share/nginx/modules/*.conf;
  14.  
  15.  
  16. events {
  17. worker_connections 1024;
  18. }
  19.  
  20.  
  21. http {
  22. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  23. '$status $body_bytes_sent "$http_referer" '
  24. '"$http_user_agent" "$http_x_forwarded_for"';
  25.  
  26.  
  27. access_log /var/log/nginx/access.log main;
  28.  
  29.  
  30. sendfile on;
  31. tcp_nopush on;
  32. tcp_nodelay on;
  33. keepalive_timeout 65;
  34. types_hash_max_size 2048;
  35.  
  36.  
  37. include /etc/nginx/mime.types;
  38. default_type application/octet-stream;
  39.  
  40.  
  41. # Load modular configuration files from the /etc/nginx/conf.d directory.
  42. # See http://nginx.org/en/docs/ngx_core_module.html#include
  43. # for more information.
  44. include /etc/nginx/conf.d/*.conf;
  45.  
  46.  
  47.  
  48. upstream uswgi {
  49. server 127.0.0.1:8000;
  50. }
  51.  
  52.  
  53. upstream php_proxy {
  54. server 94.43.85.2:9091;
  55. }
  56. server {
  57. listen 80 default_server;
  58. listen [::]:80 default_server;
  59. server_name _;
  60. return 301 https://$host$request_uri;
  61. }
  62.  
  63.  
  64. # Setings for a TLS enabled server.
  65.  
  66.  
  67. server {
  68. listen 443 ssl http2 default_server;
  69. listen [::]:443 ssl http2 default_server;
  70. server_name _;
  71. root /usr/share/nginx/html;
  72.  
  73.  
  74. ssl_certificate "/etc/pki/nginx/server.crt";
  75. ssl_certificate_key "/etc/pki/nginx/private/server.key";
  76. ssl_session_cache shared:SSL:1m;
  77. ssl_session_timeout 10m;
  78. ssl_ciphers PROFILE=SYSTEM;
  79. ssl_prefer_server_ciphers on;
  80.  
  81.  
  82. # Load configuration files for the default server block.
  83. include /etc/nginx/default.d/*.conf;
  84.  
  85.  
  86. location /vod {
  87. alias /usr/share/nginx/html/silkgo-web-player/;
  88. include /etc/nginx/default.d/*.conf;
  89. }
  90.  
  91.  
  92. location / {
  93. alias /usr/share/nginx/html/;
  94. include /etc/nginx/default.d/*.conf;
  95. }
  96.  
  97. location /fps {
  98. uwsgi_pass uswgi;
  99. alias /usr/share/nginx/html/;
  100. include /etc/nginx/uwsgi_params;
  101. add_header 'Access-Control-Allow-Origin' '*';
  102. add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
  103. add_header 'Access-Control-Allow-Headers' '*';
  104. add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
  105. }
  106.  
  107.  
  108. location /media {
  109. if ($request_method = OPTIONS ) {
  110. add_header Content-Length 0;
  111. add_header Content-Type text/plain;
  112. return 200;
  113. }
  114. alias /Backup/media;
  115. add_header 'Access-Control-Allow-Origin' '*';
  116. add_header 'Access-Control-Allow-Methods' '*';
  117. add_header 'Access-Control-Allow-Headers' '*';
  118. add_header 'Access-Control-Expose-Headers' '*';
  119. }
  120.  
  121. error_page 404 /404.html;
  122. location = /40x.html {
  123. }
  124.  
  125.  
  126. error_page 500 502 503 504 /50x.html;
  127. location = /50x.html {
  128. }
  129. }
  130.  
  131. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement