default 543 B

1234567891011121314151617181920212223242526272829
  1. server {
  2. listen 80 default_server;
  3. listen [::]:80 default_server;
  4. server_name _;
  5. root /var/www/html;
  6. index index.php;
  7. location ~ /\. {
  8. deny all;
  9. }
  10. location ~* ^.+\.(svg|svgz|eot|otf|woff|ttf|jpg|jpeg|gif|png|ico|txt)$ {
  11. expires max;
  12. access_log off;
  13. log_not_found off;
  14. }
  15. location / {
  16. try_files $uri $uri/ /index.php?$args;
  17. }
  18. location ~ \.php$ {
  19. include fastcgi_params;
  20. fastcgi_index index.php;
  21. fastcgi_pass unix:/run/php/php7.4-fpm.sock;
  22. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  23. }
  24. }