Advertisement
beqa1923

Untitled

Aug 30th, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.08 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.  
  7. user nginx;
  8. worker_processes auto;
  9. error_log /var/log/nginx/error.log;
  10. pid /run/nginx.pid;
  11.  
  12.  
  13.  
  14. # Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
  15. include /usr/share/nginx/modules/*.conf;
  16.  
  17.  
  18.  
  19. events {
  20. worker_connections 1024;
  21. }
  22.  
  23.  
  24.  
  25. http {
  26. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  27. '$status $body_bytes_sent "$http_referer" '
  28. '"$http_user_agent" "$http_x_forwarded_for"';
  29.  
  30.  
  31.  
  32. access_log /var/log/nginx/access.log main;
  33.  
  34.  
  35.  
  36. sendfile on;
  37. tcp_nopush on;
  38. tcp_nodelay on;
  39. keepalive_timeout 65;
  40. types_hash_max_size 2048;
  41.  
  42.  
  43.  
  44. include /etc/nginx/mime.types;
  45. default_type application/octet-stream;
  46.  
  47.  
  48.  
  49. # Load modular configuration files from the /etc/nginx/conf.d directory.
  50. # See http://nginx.org/en/docs/ngx_core_module.html#include
  51. # for more information.
  52. include /etc/nginx/conf.d/*.conf;
  53.  
  54.  
  55.  
  56.  
  57. upstream uswgi {
  58. server 127.0.0.1:8000;
  59. }
  60.  
  61.  
  62.  
  63. upstream php_proxy {
  64. server 94.43.85.2:9091;
  65. }
  66. server {
  67. listen 80 default_server;
  68. listen [::]:80 default_server;
  69. server_name _;
  70. return 301 https://$host$request_uri;
  71. }
  72.  
  73.  
  74.  
  75. # Setings for a TLS enabled server.
  76.  
  77.  
  78.  
  79. server {
  80. listen 443 ssl http2 default_server;
  81. listen [::]:443 ssl http2 default_server;
  82. server_name _;
  83. root /usr/share/nginx/html;
  84.  
  85.  
  86.  
  87. ssl_certificate "/etc/pki/nginx/server.crt";
  88. ssl_certificate_key "/etc/pki/nginx/private/server.key";
  89. ssl_session_cache shared:SSL:1m;
  90. ssl_session_timeout 10m;
  91. ssl_ciphers PROFILE=SYSTEM;
  92. ssl_prefer_server_ciphers on;
  93.  
  94.  
  95.  
  96. # Load configuration files for the default server block.
  97. include /etc/nginx/default.d/*.conf;
  98.  
  99.  
  100.  
  101. location /vod {
  102. alias /usr/share/nginx/html/silkgo-web-player/;
  103. include /etc/nginx/default.d/*.conf;
  104. }
  105.  
  106.  
  107.  
  108. location / {
  109. alias /usr/share/nginx/html/;
  110. include /etc/nginx/default.d/*.conf;
  111. }
  112.  
  113.  
  114.  
  115.  
  116. location /mw {
  117. proxy_pass http://php_proxy/proc/vod.php;
  118. }
  119. # location /www {
  120. # include /etc/nginx/default.d/*.conf;
  121. # root /usr/share/nginx/html/silkgo-vod-player/;
  122. # # try_files $uri $uri/ /index.php$is_args$args;
  123. # }
  124.  
  125.  
  126.  
  127. location /wv {
  128. uwsgi_pass uswgi;
  129. include /etc/nginx/uwsgi_params;
  130. add_header 'Access-Control-Allow-Origin' '*';
  131. add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
  132. add_header 'Access-Control-Allow-Headers' '*';
  133. add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
  134. }
  135.  
  136.  
  137.  
  138. location /media {
  139. if ($request_method = OPTIONS ) {
  140. add_header Content-Length 0;
  141. add_header Content-Type text/plain;
  142. return 200;
  143. }
  144. alias /Backup/media;
  145. add_header 'Access-Control-Allow-Origin' '*';
  146. add_header 'Access-Control-Allow-Methods' '*';
  147. add_header 'Access-Control-Allow-Headers' '*';
  148. add_header 'Access-Control-Expose-Headers' '*';
  149. }
  150.  
  151.  
  152.  
  153. # location /images {
  154. # alias /Backup/images;
  155. # add_header 'Access-Control-Allow-Origin' '*';
  156. # add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
  157. # add_header 'Access-Control-Allow-Headers' '*';
  158. # add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range';
  159. # }
  160.  
  161.  
  162.  
  163. error_page 404 /404.html;
  164. location = /40x.html {
  165. }
  166.  
  167.  
  168.  
  169. error_page 500 502 503 504 /50x.html;
  170. location = /50x.html {
  171. }
  172. }
  173.  
  174.  
  175.  
  176. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement