Trying to get this config to work for a reverse proxy.
location ~/626a941285b76690973c21d9e5f5587f(.*)$ {
include options.conf;
return 301 $scheme://test.ddns.net$1;
if ($bad_user) {
proxy_pass http://test.ddns.net$1;
}
}
How i want it to work is if client ip is specified in $bad_user then client is served via reverse proxy. If client IP is not in $bad_user client is redirected to server without passing via proxy. Can anyone help?