cd /usr/local/nginx cd conf/ 编辑nginx.conf 设置优先访问php文件就先运行那个文件 配置好之后退出 cd … 切换到nginx目录 ./sbin/nginx -s reload重启nginx服务