nginx location 配置详解 【转载,整理】

 

http://www.nginx.cn/115.html

 NGINX location 配置参考:http://www.cnblogs.com/zlingh/p/6288994.html

https://seonoco.com/nginx-prohibit-access-to-the-directory-or-file

#请求 nginx.com/static/1.html,请求static目录下的文件请求,区分大小写
location ~ /static/ { root /webroot/static/; }
#请求 nginx.com/static/aaa/1.html,请求static目录下的递归子目录的文件请求,区分大小写
location ~ /static { root /webroot/static/; }


 

posted @ 2017-04-19 15:26  NewLife365  阅读(273)  评论(0编辑  收藏  举报