location ~ \.PHP${ try_files $uri = 404; fastcgi_pass unix:/run/PHP-fpm/PHP-fpm.sock; fastcgi_index index.PHP; include fastcgi.conf; }
OR / AND?
upstream PHP { server unix:/run/PHP-fpm/PHP-fpm.sock; }
谢谢!
location ~ \.PHP${ try_files $uri = 404; fastcgi_pass PHP; fastcgi_index index.PHP; include fastcgi.conf; }
即:在引用PHP后端之前,不应指定http://协议.http:// PHP语法将与proxy_pass指令一起使用,而不是fastcgi_pass.