nginx-prod-http.conf 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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/public;
  25. server_name apizng.eavic.com;
  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 / {
  37. index index.html index.htm index.php;
  38. }
  39. if (!-e $request_filename) {
  40. rewrite ^(.*)$ /index.php?s=/$1 last;
  41. }
  42. location ~ \.php {
  43. add_header Cache-Control no-store;
  44. set $folder_name /var/www/html/public;
  45. root $folder_name;
  46. fastcgi_pass lfpm:9000;
  47. fastcgi_index index.php;
  48. fastcgi_split_path_info ^(.+\.php)(.*)$;
  49. fastcgi_param PATH_INFO $fastcgi_path_info;
  50. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  51. include fastcgi_params;
  52. }
  53. }
  54. server
  55. {
  56. listen 80;
  57. set $folder_name /var/www/html/admin;
  58. server_name zng.eavic.com;
  59. root $folder_name;
  60. index index.html index.php;
  61. client_max_body_size 100m;
  62. proxy_connect_timeout 500s;
  63. proxy_read_timeout 500s;
  64. proxy_send_timeout 500s;
  65. fastcgi_connect_timeout 75;
  66. fastcgi_read_timeout 600;
  67. fastcgi_send_timeout 600;
  68. charset utf-8;
  69. location / {
  70. index index.html index.htm index.php;
  71. }
  72. }
  73. }