nginx.conf 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. #user nobody;
  2. worker_processes 1;
  3. #error_log logs/error.log;
  4. #error_log logs/error.log notice;
  5. #error_log logs/error.log info;
  6. pid logs/nginx.pid;
  7. events {
  8. worker_connections 1024;
  9. }
  10. http {
  11. include mime.types;
  12. default_type application/octet-stream;
  13. server_names_hash_bucket_size 128;
  14. client_header_buffer_size 32k;
  15. large_client_header_buffers 4 32k;
  16. client_max_body_size 1024m;
  17. client_body_buffer_size 10m;
  18. sendfile on;
  19. tcp_nopush on;
  20. keepalive_timeout 120;
  21. server_tokens off;
  22. tcp_nodelay on;
  23. fastcgi_connect_timeout 300;
  24. fastcgi_send_timeout 300;
  25. fastcgi_read_timeout 300;
  26. fastcgi_buffer_size 64k;
  27. fastcgi_buffers 4 64k;
  28. fastcgi_busy_buffers_size 128k;
  29. fastcgi_temp_file_write_size 128k;
  30. fastcgi_intercept_errors on;
  31. #Gzip Compression
  32. gzip on;
  33. gzip_buffers 16 8k;
  34. gzip_comp_level 6;
  35. gzip_http_version 1.1;
  36. gzip_min_length 256;
  37. gzip_proxied any;
  38. gzip_vary on;
  39. gzip_types
  40. text/xml application/xml application/atom+xml application/rss+xml application/xhtml+xml image/svg+xml
  41. text/javascript application/javascript application/x-javascript
  42. text/x-json application/json application/x-web-app-manifest+json
  43. text/css text/plain text/x-component
  44. font/opentype application/x-font-ttf application/vnd.ms-fontobject
  45. image/x-icon;
  46. gzip_disable "MSIE [1-6]\.(?!.*SV1)";
  47. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  48. '$status $body_bytes_sent "$http_referer" '
  49. '"$http_user_agent" "$http_x_forwarded_for"';
  50. access_log /var/log/nginx/access.log main;
  51. #gzip on;
  52. server {
  53. listen 80;
  54. server_name localhost;
  55. proxy_buffer_size 1024k;
  56. proxy_buffers 16 1024k;
  57. proxy_busy_buffers_size 2048k;
  58. proxy_temp_file_write_size 2048k;
  59. location / {
  60. index index.html index.htm;
  61. }
  62. ## 苏南api
  63. location /industryParkApi {
  64. proxy_pass http://127.0.0.1:9012/;
  65. }
  66. ## 苏南web
  67. location /industryPark {
  68. proxy_pass http://127.0.0.1:8080/industryPark;
  69. }
  70. ## 苏南管理
  71. location /industryParkApp {
  72. proxy_pass http://127.0.0.1:8080/industryParkApp;
  73. }
  74. ## 苏南官网
  75. location /sunanWebsite {
  76. proxy_pass http://127.0.0.1:8080/sunanWebsite;
  77. }
  78. ## 苏南小程序验证文件
  79. location /V3WtBEtsEL.txt {
  80. alias /home/file/V3WtBEtsEL.txt;
  81. }
  82. }
  83. # server {
  84. # listen 443 ssl;
  85. # server_name lifeline.idea-sf.com;
  86. #
  87. # proxy_buffer_size 50m;
  88. # proxy_buffers 16 50m;
  89. # proxy_busy_buffers_size 100m;
  90. # proxy_temp_file_write_size 100m;
  91. #
  92. # #root html;
  93. # index index.html index.htm;
  94. # ssl_certificate cert/lifeline.idea-sf.com.pem; #需要将cert-file-name.pem替换成已上传的证书文件的名称。
  95. # ssl_certificate_key cert/lifeline.idea-sf.com.key; #需要将cert-file-name.key替换已上传的证书密钥文件的名称。
  96. # ssl_session_timeout 5m;
  97. # ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
  98. # ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  99. # ssl_prefer_server_ciphers on;
  100. # location /home {
  101. # index index.html index.htm;
  102. # proxy_pass http://10.206.0.16:9091/;
  103. # }
  104. # location / {
  105. # index index.html index.htm;
  106. # proxy_pass http://10.206.0.16:9092;
  107. # }
  108. # location /zhjg {
  109. # alias /home/projects/zhjg/dist;
  110. # index index.html index.htm;
  111. # }
  112. # location /homeH5 {
  113. # index index.html index.htm;
  114. # proxy_pass http://10.206.0.16:9098/homeH5;
  115. # }
  116. # # location ^~/api/ {
  117. # # proxy_pass http://127.0.0.1:7777;
  118. # # }
  119. #
  120. # location ^~/api/ {
  121. # root html;
  122. # index index.html index.htm;
  123. # proxy_pass http://localhost:7777;
  124. # }
  125. #
  126. # location /pdf {
  127. # alias /home/project/idea_home/upload; # 指定实际目录绝对路径
  128. # autoindex on; # 开启目录浏览功能
  129. # }
  130. #
  131. # location /ganqApi {
  132. # root html;
  133. # index index.html index.htm;
  134. # proxy_pass http://10.206.0.16:9101/;
  135. # }
  136. #
  137. # location /ganq {
  138. # root html;
  139. # index index.html index.htm;
  140. # proxy_pass http://10.206.0.16:8080/ganq;
  141. # }
  142. #
  143. # # 生命线
  144. # location /lifelineApi {
  145. # root html;
  146. # index index.html index.htm;
  147. # proxy_pass http://10.206.0.16:9001/;
  148. # }
  149. #
  150. # location /lifeline {
  151. # root html;
  152. # index index.html index.htm;
  153. # proxy_pass http://10.206.0.16:8080/lifeline;
  154. # }
  155. # }
  156. }