simple-phpfpm.nginxconf 954 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. server {
  2. listen 80;
  3. server_name DOMAIN.LTD;
  4. root /var/www/DOMAIN.LTD/public_html;
  5. index index.html index.php;
  6. charset utf-8;
  7. location / {
  8. try_files $uri $uri/ /index.php?$query_string;
  9. }
  10. location = /favicon.ico { access_log off; log_not_found off; }
  11. location = /robots.txt { access_log off; log_not_found off; }
  12. access_log on;
  13. error_log /var/www/DOMAIN.LTD/log/error.log;
  14. sendfile off;
  15. client_max_body_size 100m;
  16. location ~ \.php$ {
  17. fastcgi_split_path_info ^(.+\.php)(/.+)$;
  18. fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  19. fastcgi_index index.php;
  20. include fastcgi_params;
  21. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  22. fastcgi_intercept_errors off;
  23. fastcgi_buffer_size 16k;
  24. fastcgi_buffers 4 16k;
  25. }
  26. location ~ /\.ht {
  27. deny all;
  28. }
  29. # website should not be displayed inside a <frame>, an <iframe> or an <object>
  30. add_header X-Frame-Options SAMEORIGIN;
  31. }