Нет описания

nginx.conf 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. user www-data;
  2. worker_processes auto;
  3. pid /run/nginx.pid;
  4. include /etc/nginx/modules-enabled/*.conf;
  5. events {
  6. worker_connections 768;
  7. # multi_accept on;
  8. }
  9. http {
  10. ##
  11. # Basic Settings
  12. ##
  13. sendfile on;
  14. tcp_nopush on;
  15. types_hash_max_size 2048;
  16. # server_tokens off;
  17. # server_names_hash_bucket_size 64;
  18. # server_name_in_redirect off;
  19. include /etc/nginx/mime.types;
  20. default_type application/octet-stream;
  21. ##
  22. # SSL Settings
  23. ##
  24. ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
  25. ssl_prefer_server_ciphers on;
  26. ##
  27. # Logging Settings
  28. ##
  29. access_log /var/log/nginx/access.log;
  30. error_log /var/log/nginx/error.log;
  31. server {
  32. listen 8121;
  33. server_name localhost;
  34. location / {
  35. root /home/website/web;
  36. try_files $uri $uri/ /index.html;
  37. index index.html index.htm;
  38. }
  39. location /prod-api/{
  40. proxy_set_header Host $http_host;
  41. proxy_set_header X-Real-IP $remote_addr;
  42. proxy_set_header REMOTE-HOST $remote_addr;
  43. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  44. proxy_pass http://localhost:8120/;
  45. }
  46. error_page 500 502 503 504 /50x.html;
  47. location = /50x.html {
  48. root html;
  49. }
  50. }
  51. server {
  52. listen 8221;
  53. server_name localhost;
  54. location / {
  55. root /home/website/bigScreen;
  56. try_files $uri $uri/ /index.html;
  57. index index.html index.htm;
  58. }
  59. location /prod-api/{
  60. proxy_set_header Host $http_host;
  61. proxy_set_header X-Real-IP $remote_addr;
  62. proxy_set_header REMOTE-HOST $remote_addr;
  63. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  64. proxy_pass http://localhost:8120/;
  65. }
  66. error_page 500 502 503 504 /50x.html;
  67. location = /50x.html {
  68. root html;
  69. }
  70. }
  71. ##
  72. # Gzip Settings
  73. ##
  74. gzip on;
  75. # gzip_vary on;
  76. # gzip_proxied any;
  77. # gzip_comp_level 6;
  78. # gzip_buffers 16 8k;
  79. # gzip_http_version 1.1;
  80. # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
  81. ##
  82. # Virtual Host Configs
  83. ##
  84. include /etc/nginx/conf.d/*.conf;
  85. include /etc/nginx/sites-enabled/*;
  86. }
  87. #mail {
  88. # # See sample authentication script at:
  89. # # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  90. #
  91. # # auth_http localhost/auth.php;
  92. # # pop3_capabilities "TOP" "USER";
  93. # # imap_capabilities "IMAP4rev1" "UIDPLUS";
  94. #
  95. # server {
  96. # listen localhost:110;
  97. # protocol pop3;
  98. # proxy on;
  99. # }
  100. #
  101. # server {
  102. # listen localhost:143;
  103. # protocol imap;
  104. # proxy on;
  105. # }
  106. #}