当nginx服务器配置访问index.html成功之后报错:
1、nginx的error.log文件中的报错:connect() failed (111: Connection refused) while connecting to upstream.
有可能是php-fpm服务没有开启,当然我在配置过程中开启了php-fpm服务器之后,没有报该错误了;
2、接着报的错误是:FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream
网上百度说修改nginx的配置文件中的:
fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
修改为:
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
我是直接按照这样修改的,重启之后生效啦,$document_root指向网站访问的根目录)