I have the following in my nginx configuration:
# /abx/xyz/
location /abc/xyz/ {
allow 5.194.207.217;
deny all;
proxy_pass http://proxy-server/;
}
location /abc/ {
proxy_pass http://proxy-server/;
}
Whenever I access /abc/xyz
it returns a 404 Not Found
error.
How can I make /abx/xyz
work correctly?
I was missing appending
/xyz
to the proxy_pass URL.So the correct answer would be as follows: