default.conf 850 B

123456789101112131415161718192021222324252627282930313233343536
  1. server {
  2. listen 80 default_server;
  3. root /var/www/html;
  4. index index.html index.php;
  5. charset utf-8;
  6. location / {
  7. try_files $uri $uri/ /index.php?$query_string;
  8. }
  9. location = /favicon.ico { access_log off; log_not_found off; }
  10. location = /robots.txt { access_log off; log_not_found off; }
  11. access_log on;
  12. error_log /var/log/nginx/error.log error;
  13. sendfile off;
  14. client_max_body_size 100m;
  15. location ~ \.php$ {
  16. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  17. fastcgi_pass php:9000;
  18. fastcgi_index index.php;
  19. include fastcgi_params;
  20. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  21. fastcgi_intercept_errors off;
  22. fastcgi_buffer_size 16k;
  23. fastcgi_buffers 4 16k;
  24. }
  25. location ~ /\.ht {
  26. deny all;
  27. }
  28. }