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; } }