default.conf 732 B

12345678910111213141516171819202122232425
  1. upstream php74_upstream {
  2. server php-fpm:9000;
  3. }
  4. server {
  5. listen 80;
  6. server_name am.local;
  7. index index.php;
  8. set $droot /app/web;
  9. root $droot;
  10. access_log /var/log/nginx/template_access.log;
  11. error_log /var/log/nginx/template_error.log;
  12. location / {
  13. try_files $uri $uri/ /index.php$is_args$args;
  14. }
  15. location ~ \.php$ {
  16. fastcgi_pass php74_upstream;
  17. fastcgi_index index.php;
  18. include fastcgi_params;
  19. fastcgi_param SCRIPT_FILENAME $droot/$fastcgi_script_name;
  20. fastcgi_param PATH_INFO $fastcgi_script_name;
  21. fastcgi_buffering off;
  22. }
  23. }