nginx-test-http.conf 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. user nginx;
  2. worker_processes 1;
  3. error_log /var/error.log info;
  4. #pid logs/nginx.pid;
  5. worker_rlimit_nofile 1024;
  6. events {
  7. worker_connections 1024;
  8. }
  9. http
  10. {
  11. include mime.types;
  12. default_type application/octet-stream;
  13. fastcgi_buffer_size 32k;
  14. fastcgi_buffers 8 32k;
  15. underscores_in_headers on;
  16. client_max_body_size 1024M;
  17. sendfile on;
  18. keepalive_timeout 65;
  19. log_format main '$remote_addr - $remote_user [$time_local] "$request" '
  20. '$status $body_bytes_sent "$http_referer" '
  21. '"$http_user_agent" "$http_x_forwarded_for"';
  22. server
  23. {
  24. listen 80;
  25. set $folder_name /var/www/html;
  26. server_name 39.97.239.116;
  27. root $folder_name;
  28. index index.html Index.php;
  29. client_max_body_size 100m;
  30. proxy_connect_timeout 500s;
  31. proxy_read_timeout 500s;
  32. proxy_send_timeout 500s;
  33. fastcgi_connect_timeout 75;
  34. fastcgi_read_timeout 600;
  35. fastcgi_send_timeout 600;
  36. charset utf-8;
  37. location /data/log {
  38. deny all;
  39. return 403;
  40. }
  41. location / {
  42. index index.html index.htm Index.php;
  43. }
  44. if (!-e $request_filename) {
  45. rewrite ^(.*)$ /Index.php?s=/$1 last;
  46. }
  47. location ~ \.php {
  48. add_header Cache-Control no-store;
  49. set $folder_name /var/www/html/public;
  50. root $folder_name;
  51. fastcgi_pass accfpm:9000;
  52. fastcgi_index Index.php;
  53. fastcgi_split_path_info ^(.+\.php)(.*)$;
  54. fastcgi_param PATH_INFO $fastcgi_path_info;
  55. fastcgi_param SCRIPT_FILENAME $folder_name$fastcgi_script_name;
  56. include fastcgi_params;
  57. }
  58. }
  59. }