nginx-stanley-http.conf 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. user nginx;
  2. worker_processes 1;
  3. error_log /var/error.log info;
  4. worker_rlimit_nofile 1024;
  5. events {
  6. worker_connections 1024;
  7. }
  8. http
  9. {
  10. include mime.types;
  11. default_type application/octet-stream;
  12. fastcgi_buffer_size 32k;
  13. fastcgi_buffers 8 32k;
  14. underscores_in_headers on;
  15. client_max_body_size 1024M;
  16. sendfile on;
  17. keepalive_timeout 65;
  18. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  19. '$status $body_bytes_sent "$http_referer" '
  20. '"$http_user_agent" "$http_x_forwarded_for"';
  21. server
  22. {
  23. listen 80;
  24. set $folder_name /var/www/html;
  25. server_name 192.168.1.220;
  26. root $folder_name;
  27. index index.html index.php;
  28. client_max_body_size 100m;
  29. proxy_connect_timeout 500s;
  30. proxy_read_timeout 500s;
  31. proxy_send_timeout 500s;
  32. fastcgi_connect_timeout 75;
  33. fastcgi_read_timeout 600;
  34. fastcgi_send_timeout 600;
  35. charset utf-8;
  36. location /logs {
  37. deny all;
  38. return 403;
  39. }
  40. location /data/log {
  41. deny all;
  42. return 403;
  43. }
  44. location / {
  45. index index.html index.htm index.php;
  46. }
  47. location /mshop {
  48. root $folder_name;
  49. autoindex on;
  50. index index.html index.htm index.php;
  51. try_files $uri $uri/ /mshop/index.html;
  52. }
  53. location /plot {
  54. root $folder_name;
  55. proxy_pass http://host.docker.internal:5000;
  56. proxy_redirect off;
  57. proxy_set_header Host $host;
  58. proxy_set_header X-Real-IP $remote_addr;
  59. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  60. proxy_set_header X-Forwarded-Proto $scheme;
  61. }
  62. location ~ /mobile/[/\w]+\.php$ {
  63. root $folder_name;
  64. fastcgi_pass host.docker.internal:9100;
  65. fastcgi_index index.php;
  66. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  67. fastcgi_param SIGN $http_sign;
  68. include fastcgi_params;
  69. }
  70. location ~ /mobile/[/\w]+\.html$ {
  71. try_files $uri $uri/ /mobile/index.html;
  72. }
  73. location ~ /racc/[/\w]+\.php$ {
  74. root $folder_name;
  75. fastcgi_pass host.docker.internal:9101;
  76. fastcgi_index index.php;
  77. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  78. fastcgi_param SIGN $http_sign;
  79. include fastcgi_params;
  80. }
  81. location ~ \.php$ {
  82. add_header Cache-Control no-store;
  83. root $folder_name;
  84. fastcgi_pass host.docker.internal:9000;
  85. fastcgi_index index.php;
  86. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  87. include fastcgi_params;
  88. }
  89. }
  90. }