nginx访问静态资源

1.本地D:\aa\static建立1.html

2.nginx.conf中增加

location /static {
  root d:/aa;
}

3.最后访问http://127.0.0.1:8888/static/1.html (我的nginx配的端口是8888)

root的意思是从哪一个路径开始最后访问的静态资源=root+location

posted @ 2020-06-06 14:51  扶不起的刘阿斗  阅读(570)  评论(0编辑  收藏  举报