Query on nginx. conf file regarding redirection.

Francis Daly francis at daoine.org
Thu Oct 29 23:05:11 UTC 2020

On Thu, Oct 29, 2020 at 11:42:11PM +0530, Kaushal Shriyan wrote:

Hi there,

> When I hit this URL on
> the browser it does not get redirected to
> https://vpc-lab-test-search-7hyay88a9kjuisl.eu-north-1.es.amazonaws.com/;

What does the nginx access log or error log say happened to that request?

Also: what IP address does
vpc-lab-test-search-7hyay88a9kjuisl.eu-north-1.es.amazonaws.com have
right now; and what IP address did it have when nginx was started?

Your test request goes to port 80 on a specific IP address; your nginx
is listening on port 81 on a non-specified IP address -- if the nginx
logs do not show that this nginx got that request, then that's a thing
to fix before the nginx config.

And your proxy_pass is to a hostname that will be resolved once,
at startup; if the remote address changes, your nginx config will not
notice the change.

> Similarly, when I hit this URL
> on the browser it does
> not get redirected to
> https://vpc-lab-prod-search-9aay182kkjoisl.eu-north-1.es.amazonaws.com/

Same questions; same reasons (except this nginx does listen on port 80).


Francis Daly        francis at daoine.org

More information about the nginx mailing list