nginx alias与root的区别
看例子:
-
location ~ ^/awstats/ { root /home/awstats/;
访问:http://test.com/awstats/ 实际访问的是/home/awstats/awstats/
-
location ~ ^/awstats/ { alias /home/
访问:http://test.com/awstats/ 实际访问的是/home/
看例子:
location ~ ^/awstats/ {
root /home/awstats/;
访问:http://test.com/awstats/ 实际访问的是/home/awstats/awstats/
location ~ ^/awstats/ {
alias /home/
访问:http://test.com/awstats/ 实际访问的是/home/
暂无评论。
评论功能维护中,当前仅展示历史评论。