location / {    
            
            # 默认去第一个目录查找
            root html/static1;            
            index  index.html index.htm;                        
            
            # 如果文件没有找到就继续2
            if (!-e $request_filename) {                
                root html/static2;                
            }
            
            # 如果文件没有找到就继续3
            if (!-e $request_filename) {
                root html/static3;                
            }
            # 还没有找到就定位到云上去
            if (!-e $request_filename) {
                rewrite ^/(.*)$ https://www.hi-linux.com/$1;
            }
        }

 

相关文章:

  • 2021-10-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-06
  • 2022-12-23
  • 2022-02-27
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-27
  • 2022-12-23
  • 2021-11-26
  • 2022-12-23
  • 2021-11-23
相关资源
相似解决方案