1.编辑 nginx.conf
2.location/{
root /usr/local/nginx/html
}
将 root /usr/local/nginx/html 放到上一级 server下解决问题
3.贴上我的 nginx.conf文件
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.youkuaiyun.com/rofth/article/details/78581617
本文详细介绍了如何编辑nginx.conf文件,解决Nginx服务器配置问题,包括如何正确设置root路径和location块,确保网站能够正常运行。同时分享了具体的配置案例。
1110

被折叠的 条评论
为什么被折叠?



