root和alias的区别

  • root和alias的区别
例:
location /images/ {
      root /data/web; #路径,实际路径跟上头
      http://www.aaa.com/images/a.jpg ==> /data/web/images/a.jpg
}
例:
location /images/ {
      alias /data/web;
      http://www.aaa.com/images/a.jpg ==> /data/web/a.jpg
}

 

posted @ 2018-03-01 15:16  xgmxm  阅读(135)  评论(0编辑  收藏  举报