AWS OpenSearch running in vpc behind nginx proxy but login doesn't work

Viewed 38

I have an opensearch instance which is in a VPC behind an nginx proxy which use master id with password

I can access dashboards through a reverse proxy. However, despite entering the correct ID and password, it continues to redirect to the login screen and response 401 Unauthorized.

Login worked fine when simply tunneling instances without nginx reverse proxy.

how can i fix it?

here is my ngnix default

server {
    listen 80 default_server;
    listen [::]:80 default_server;

    root /var/www/html;

    server_name _;

    location / {
        proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header Host $http_host;

                proxy_pass myhost/_dashboards;
    }
}

0 Answers
Related