2.反向代理nginx之php

php-fpm 其实有自己的http服务
我们通过访问本服务器,进而代理访问的php的服务

location ~* \.php$
{
try_files $uri =404;
fastcgi_pass unix:/var/run/php/php7.3-fpm.sock;
# 或者fastcgi_pass http://127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# sock时,关闭fastcgi_buffering
fastcgi_buffering off;
include fastcgi_params;
}
点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注