<div dir="ltr"><div><div>Hi guys!<br><br></div>I have a configuration taht cant make it work Here is the data. First i check taht if i come from location2 with geo so taht it uses lcoation 2 backends.. But as there are things taht are not in location2 i need to go to default location in case there is an 404 o 403 as git shows me 403 although the repo doesnt exist.<br><br>This isnt working.. i receive the 403 form location2 but never tries the backup server.. Any help or any other way to do it will greatly appreciate!<br><br>geo $upstream {<br>        default git_loc1;<br><br>        x.x.0.0/16 git_loc1;<br>        x.x.0.0/16 git_loc2;<br>}<br><br>upstream git_loc1 {<br>        hash $remote_addr$remote_user;<br><br>        server git1.loc1.bla:443;<br>        server git2.loc1.bla:443;<br>}<br><br>upstream git_loc2 {<br><br>        server git.loc2.bla:443;<br><br>        server git.loc1.bla:443 backup;<br>}<br><br><br>server {<br>        listen 80;<br>        server_name git.bla;<br><br>        error_log  logs/git-error.log  debug;<br>        access_log logs/git_access.log upstreamlog;<br><br>        location / {<br>                proxy_intercept_errors on;<br>                error_log logs/git-pp-error.log debug;<br>                proxy_next_upstream error http_403 http_404;<br>                proxy_pass https://$upstream;<br>        }<br><br>}<br><br><br></div>Cheers!<br></div>