参考文章: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/
 


相关文章:

  • 2022-01-07
  • 2022-01-07
  • 2022-01-07
  • 2022-01-07
  • 2022-01-07
  • 2022-01-01
  • 2021-11-30
猜你喜欢
  • 2021-12-03
  • 2021-09-14
  • 2022-03-03
  • 2022-12-23
  • 2022-02-01
  • 2021-04-04
  • 2021-09-24
相关资源
相似解决方案