通常状况网页报502 很大多是配置文件出错了,最大多是fastcgi_pass unix:这个参数错误。
因此直接去找php fpm下面的www.conf里面的listen
/etc/php/5.6/fpm/pool.d/www.conf
或者是/etc/php/7.0/fpm/pool.d/www.conf 具体在哪里看你怎么装php
若是Listen是端口就写127.0.0.1:9000;html
若是Listen是路径,nginx的配置文件也要写路径,unix:/run/php/php5.6-fpm.sock;或者/run/php/php7.0-fpm.sock; 反正里面是什么就填什么。nginx
netstat -ant | grep 9000服务器
若是出现404 找不到页面的问题是由于服务器不支持重写。不支持tp框架的pathinfo这套东西。php7
# --start--- TP5加上这一块 支持pathinfo location /{ index index.html index.htm index.php; if (-e $request_filename) { break; } if (!-e $request_filename) { rewrite ^/(.*)$ /index.php/$1 last; break; } } location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+\.php)(/.+)$; try_files $fastcgi_script_name =404; set $path_info $fastcgi_path_info; fastcgi_param PATH_INFO $path_info; fastcgi_pass unix:/tmp/php-cgi.sock; fastcgi_index index.php; include fastcgi.conf; } # --end--- TP5加上这一块 支持pathinfo