default.conf 586 B

12345678910111213141516171819202122232425262728293031323334
  1. upstream fastcgi_backend {
  2. server PHP_HOST:PHP_PORT;
  3. }
  4. server {
  5. listen 80;
  6. server_name localhost;
  7. set $MAGE_ROOT /var/www/html;
  8. root $MAGE_ROOT;
  9. index index.php;
  10. autoindex off;
  11. charset off;
  12. add_header 'X-Content-Type-Options' 'nosniff';
  13. location / {
  14. try_files $uri $uri/ /index.php?$args;
  15. }
  16. location ~ cron\.php {
  17. deny all;
  18. }
  19. location ~* \.php$ {
  20. try_files $uri =404;
  21. fastcgi_pass fastcgi_backend;
  22. fastcgi_index index.php;
  23. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  24. include fastcgi_params;
  25. }
  26. }