I have nginx proxy and I want all requests to be proxied to another server with the same uri.
Here's what I did:
location / {
proxy_pass https://example.com;
}
But I need one exception in this rule - when url is empty (user visits actual / location) I want to proxy this request to https://example.com/index
How do I write a rule for an empty url?