Query on nginx. conf file regarding redirection.

Kaushal Shriyan kaushalshriyan at gmail.com
Thu Oct 29 18:12:11 UTC 2020


Hi,

I have a specific query regarding the below /etc/nginx/nginx.conf file.

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

# TEST
    server {
     listen 81;
     location /test {
        proxy_set_header   X-Forwarded-For $remote_addr;
        proxy_set_header   Host $http_host;
        fastcgi_read_timeout 240;
        proxy_pass
https://vpc-lab-test-search-7hyay88a9kjuisl.eu-north-1.es.amazonaws.com/;
        }
        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }

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

# PROD
    server {
     listen 80;
     location /prod {
            proxy_set_header   X-Forwarded-For $remote_addr;
     proxy_set_header   Host $http_host;
            fastcgi_read_timeout 240;
     proxy_pass
https://vpc-lab-prod-search-9aay182kkjoisl.eu-north-1.es.amazonaws.com/;;
        }
        error_page 404 /404.html;
            location = /40x.html {
        }

        error_page 500 502 503 504 /50x.html;
            location = /50x.html {
        }
    }

Any help will be highly appreciated. Thanks in Advance and I look forward
to hearing from you.

Best Regards,

Kaushal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20201029/a5a2247c/attachment-0001.htm>


More information about the nginx mailing list