1.編輯 nginx.confphp
2.location/{html
root /usr/local/nginx/htmlnginx
}spa
將 root /usr/local/nginx/html 放到上一級 server下解決問題.net
3.貼上個人 nginx.conf文件code
server { listen 80; server_name www.姚虎.top; root /XXXX/html; #charset koi8-r; #access_log logs/host.access.log main; location / { #root html; index index.html index.htm index.php; }
推薦博文 https://blog.csdn.net/rofth/article/details/78581617server