配置
- 如果有url路径,则查找的网页本地路径需要加上url的路径,比如/root/good
2.需要注意第一行的user,需要给文件夹加权限,要加到root目录。
chmod -R 777 /root
location /{
root /usr/local/nginx/html;
index index.html;
}
location /good {
root /root;
index hello.html;
}
网友评论