<div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 30, 2020 at 4:35 AM Francis Daly <<a href="mailto:francis@daoine.org">francis@daoine.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, Oct 29, 2020 at 11:42:11PM +0530, Kaushal Shriyan wrote:<br>
<br>
Hi there,<br>
<br>
> When I hit this URL <a href="http://219.11.134.114/test/_plugin/kibana/app/kibana" rel="noreferrer" target="_blank">http://219.11.134.114/test/_plugin/kibana/app/kibana</a> on<br>
> the browser it does not get redirected to<br>
> <a href="https://vpc-lab-test-search-7hyay88a9kjuisl.eu-north-1.es.amazonaws.com/" rel="noreferrer" target="_blank">https://vpc-lab-test-search-7hyay88a9kjuisl.eu-north-1.es.amazonaws.com/</a>;<br>
<br>
What does the nginx access log or error log say happened to that request?<br>
<br>
Also: what IP address does<br>
<a href="http://vpc-lab-test-search-7hyay88a9kjuisl.eu-north-1.es.amazonaws.com" rel="noreferrer" target="_blank">vpc-lab-test-search-7hyay88a9kjuisl.eu-north-1.es.amazonaws.com</a> have<br>
right now; and what IP address did it have when nginx was started?<br>
<br>
<br>
Your test request goes to port 80 on a specific IP address; your nginx<br>
is listening on port 81 on a non-specified IP address -- if the nginx<br>
logs do not show that this nginx got that request, then that's a thing<br>
to fix before the nginx config.<br>
<br>
And your proxy_pass is to a hostname that will be resolved once,<br>
at startup; if the remote address changes, your nginx config will not<br>
notice the change.<br>
<br>
> Similarly, when I hit this URL<br>
> <a href="http://219.11.134.114/prod/_plugin/kibana/app/kibana" rel="noreferrer" target="_blank">http://219.11.134.114/prod/_plugin/kibana/app/kibana</a> on the browser it does<br>
> not get redirected to<br>
> <a href="https://vpc-lab-prod-search-9aay182kkjoisl.eu-north-1.es.amazonaws.com/" rel="noreferrer" target="_blank">https://vpc-lab-prod-search-9aay182kkjoisl.eu-north-1.es.amazonaws.com/</a><br>
<br>
Same questions; same reasons (except this nginx does listen on port 80).<br>
<br>
Cheers,<br>
<br>         <br></blockquote><div><br></div><div><br></div><div>Hi Francis,</div><div><br></div><div>I am seeing this below message when I hit <a href="http://219.11.134.114/test/_plugin/kibana/app/kibana" rel="noreferrer" target="_blank">http://219.11.134.114/test/_plugin/kibana/app/kibana</a></div><div><br></div>==> /var/log/nginx/error.log <==<br>2020/10/30 17:10:57 [error] 9616#0: *20 open() "/usr/share/nginx/html/test/_plugin/kibana/app/kibana" failed (2: No such file or directory), client: 14.98.153.6, server: , request: "GET /test/_plugin/kibana/app/kibana HTTP/1.1", host: "219.11.134.114"<br><br>==> /var/log/nginx/access.log <==<br>14.98.153.6 - - [30/Oct/2020:17:10:57 +0000] "GET /test/_plugin/kibana/app/kibana HTTP/1.1" 404 3650 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36" "-"</div><div class="gmail_quote"><br></div><div class="gmail_quote"><br></div><div class="gmail_quote"> # TEST<br>    server {<br>     listen 80;<br>     location /test {<br>        proxy_set_header   X-Forwarded-For $remote_addr;<br>        proxy_set_header   Host $http_host;<br>        #fastcgi_read_timeout 240;<br>        proxy_connect_timeout 600;<br>        proxy_send_timeout 600;<br>        proxy_read_timeout 600;<br>        send_timeout 600;<br>        proxy_pass  <a href="https://vpc-lab-test-search-7hyay88a9kjuisl.eu-north-1.es.amazonaws.com/" rel="noreferrer" target="_blank">https://vpc-lab-test-search-7hyay88a9kjuisl.eu-north-1.es.amazonaws.com/</a>;<br>        }<br>        error_page 404 /404.html;<br>            location = /40x.html {<br>        }<br><br>        error_page 500 502 503 504 /50x.html;<br>            location = /50x.html {<br>        }<br>    }<br><div> </div><div>Also, I am not sure why it is getting referenced to /usr/share/nginx/html/? Is there a way to change the default document root? Please suggest further.</div><div><br></div><div>Best Regards,</div></div></div>