访问106.12.100.206/test/ 到本地的/etc/nginx/nginx1/下
location / {
root /etc;
index 1.txt;
}
location /test/ {
#rewrite ^/test/(.*)$ /$1 last;
alias /etc/nginx/nginx1/;
index 1.txt;
}
root用来设置根目录,而alias用来重置当前文件的目录。
有问题请加博主微信进行沟通!
全部评论