nginx虚拟目录配置


参考文章:https://blog.csdn.net/whatday/article/details/50649461

 

 
1. location ~ ^/awstats/ { root /home/awstats/;
访问:http://test.com/awstats/ 实际访问的是/home/awstats/awstats/

 2. location ~ ^/awstats/ { alias /home/
访问:http://test.com/awstats/ 实际访问的是/home/

3. location ~ ^/awstats/ { #使用alias时目录名后面一定要加“/” alias /home/awstats/; 
访问:http://test.com/awstats/ 实际访问的是/home/awstats/

4. location ~ ^/awstats/ { root /home/; 

 

访问:http://test.com/awstats/ 实际访问的是/home/awstats/
 



免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM