nginx解析php文件时502
fastcgi_fast路径问题
检查下面的配置(服务器配置,/etc/nginx/site-enabled/
下配置项,以default
为例).
location ~ \.php$ {
include snippets/fastcgi-php.conf;
#
# # With php5-fpm (or other unix sockets):
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
# # With php5-cgi (or other tcp sockets):
# fastcgi_pass 127.0.0.1:9000;
}
检查fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
配置,确认/var/run/php/php7.0-fpm.sock
存在。 deepin 15.3
中,该设置默认为fastcgi_pass unix:/var/run/php7.0-fpm.sock
, 而文件php7.0-fpm.sock
真实路径为/var/run/php/php7.0-fpm.sock
。
最后更新于
这有帮助吗?