摘要: nginx指定文件路径有两种方式root和alias,这两者的用法区别,使用方法总结了下,方便大家在应用过程中,快速响应。root与alias主要区别在于nginx如何解释location后面的uri,这会使两者分别以不同的方式将请求映射到服务器文件上。[root]语法:root path默认值:root html配置段:http、server、location、if[alias]语法:alias path配置段:location实例:location~^/weblogs/{root/data/weblogs/www.ttlsa.com;#--注释1autoindex on;#--注释2aut 阅读全文
posted @ 2014-03-28 11:57 星空刺 阅读(615) 评论(0) 推荐(0) 编辑