nginx.conf 499 B

1234567891011121314151617181920212223
  1. # Default server definition
  2. server {
  3. listen 80;
  4. server_name _;
  5. root /var/www/html;
  6. index index.php index.html index.htm;
  7. location / {
  8. try_files $uri $uri/ /index.php?$args;
  9. }
  10. location ~ \.php$ {
  11. include fastcgi_params;
  12. fastcgi_pass unix:/var/run/php-fpm.sock;
  13. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  14. fastcgi_param PATH_INFO $fastcgi_script_name;
  15. }
  16. location ~ /\.ht {
  17. deny all;
  18. }
  19. }