服务器环境为
PHP 7.1.9-1+ubuntu16.04.1
在nginx的配置文件里这么写的:
server{
listen 80; server_name www.xxxx.cn; root /home/kuangcs/sites/www.xxxx.cn; index index.html index.htm index.php; location ~ \.php$ { fastcgi_pass unix:/run/php/php7.1-fpm.sock; #fastcgi_index index.php; include fastcgi_params; } }
重启nginx后房屋域名可访问该目录下txt文件,访问php文件为一片空白,特询问如何正常配置,谢谢。
按下面的方法写,自行搞定。
可能的原因是在php7.1下建议不用9000端口解决。