工业互联网平台搭建的仓库管理系统
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.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. #log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  14. # '$status $body_bytes_sent "$http_referer" '
  15. # '"$http_user_agent" "$http_x_forwarded_for"';
  16. #access_log logs/access.log main;
  17. sendfile on;
  18. #tcp_nopush on;
  19. #keepalive_timeout 0;
  20. keepalive_timeout 65;
  21. client_max_body_size 10m;
  22. #gzip on;
  23. upstream gateways {
  24. server 172.16.2.76:8003;
  25. server 172.16.2.78:8003;
  26. }
  27. server {
  28. listen 80;
  29. server_name http://172.16.2.78;
  30. #charset koi8-r;
  31. #access_log logs/host.access.log main;
  32. location / {
  33. root /www/dist/;
  34. index index.html index.htm;
  35. }
  36. location /yygkpt/ {
  37. proxy_pass http://gateways/;
  38. }
  39. location /webroot/{
  40. return 307 http://172.16.2.78/fr$request_uri;
  41. }
  42. location /fr/ {
  43. proxy_pass http://172.16.1.56:8080/;
  44. add_header Access-Control-Allow-Origin *;
  45. add_header Access-Control-Allow-Headers X-Requested-With;
  46. add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
  47. proxy_redirect off;
  48. proxy_set_header Host $host;
  49. proxy_set_header X-Real-IP $remote_addr;
  50. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  51. client_max_body_size 10m;
  52. client_body_buffer_size 128k;
  53. proxy_buffers 32 4k;
  54. proxy_connect_timeout 600;
  55. proxy_send_timeout 600;
  56. proxy_read_timeout 600;
  57. }
  58. location /oa {
  59. alias /www/oa/;
  60. index index.html index.htm;
  61. }
  62. location ^~ /release/ {
  63. alias /release/;
  64. sendfile on; # 开启高效文件传输模式
  65. autoindex on; # 开启目录文件列表
  66. autoindex_exact_size on; # 显示出文件的确切大小,单位是bytes
  67. autoindex_localtime on; # 显示的文件时间为文件的服务器时间
  68. charset utf-8,gbk; # 避免中文乱码
  69. }
  70. #error_page 404 /404.html;
  71. # redirect server error pages to the static page /50x.html
  72. #
  73. error_page 500 502 503 504 /50x.html;
  74. location = /50x.html {
  75. root html;
  76. }
  77. # proxy the PHP scripts to Apache listening on 127.0.0.1:80
  78. #
  79. #location ~ \.php$ {
  80. # proxy_pass http://127.0.0.1;
  81. #}
  82. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  83. #
  84. #location ~ \.php$ {
  85. # root html;
  86. # fastcgi_pass 127.0.0.1:9000;
  87. # fastcgi_index index.php;
  88. # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
  89. # include fastcgi_params;
  90. #}
  91. # deny access to .htaccess files, if Apache's document root
  92. # concurs with nginx's one
  93. #
  94. #location ~ /\.ht {
  95. # deny all;
  96. #}
  97. }
  98. # another virtual host using mix of IP-, name-, and port-based configuration
  99. #
  100. #server {
  101. # listen 8000;
  102. # listen somename:8080;
  103. # server_name somename alias another.alias;
  104. # location / {
  105. # root html;
  106. # index index.html index.htm;
  107. # }
  108. #}
  109. # HTTPS server
  110. #
  111. #server {
  112. # listen 443 ssl;
  113. # server_name www.yuanxisoft.com;
  114. # ssl on;
  115. # ssl_certificate /www/yuanxisoft.com_bundle.pem;
  116. # ssl_certificate_key /www/yuanxisoft.com.key;
  117. # ssl_session_cache shared:SSL:1m;
  118. # ssl_session_timeout 5m;
  119. # ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
  120. # ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
  121. # ssl_prefer_server_ciphers on;
  122. # location / {
  123. # add_header Access-Control-Allow-Credentials true;
  124. # add_header Access-Control-Allow-Origin *;
  125. # add_header Access-Control-Allow-Methods *;
  126. # add_header Access-Control-Allow-Headers *;
  127. # if ($request_method = 'OPTIONS') {
  128. # return 200;
  129. # }
  130. # proxy_pass https://www.yuanxisoft.com:8003/;
  131. # proxy_set_header Host $host;
  132. # proxy_set_header X-Real-IP $remote_addr;
  133. # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  134. # }
  135. # }
  136. }