Hello,
Greetings
I have 2 Aws elasticsearch domains (test/prod). i need to access both kibana dashboard using single nginx reverse proxy server.
can any please help me with nginx config file and steps.
Url :
1) https://elastic-endpoint.test.amazonaws.com;
2) https://elastic-endpoint.prod.amazonaws.com;
need to access both urls using single nginx reverse proxy server(ec2) .
below steps i have tried to achieve that :
1) Created Ec2 (ubuntu ) instance in same vpc which elastic domains are reside.
2) installed nginx in instance.
3) unlinked the Default - site enabled folder
4) created elasticsearch config file.
config file :
server {
listen 80;
location /test/{
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
rewrite ^/test/(.*) $1 break;
proxy_pass https://elastic-endpoint.test.amazonaws.com;
}
location /prod/{
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
rewrite ^/prod/(.*) $1 break;
proxy_pass https://elastic-endpoint.prod.amazonaws.com;
}
}
5) by trying ngnix -t i am getting
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
6) sudo service nginx reload
7) after trying that i am getting 404 not found error
Can anyone please assist me
Thanks
Sai
Greetings
I have 2 Aws elasticsearch domains (test/prod). i need to access both kibana dashboard using single nginx reverse proxy server.
can any please help me with nginx config file and steps.
Url :
1) https://elastic-endpoint.test.amazonaws.com;
2) https://elastic-endpoint.prod.amazonaws.com;
need to access both urls using single nginx reverse proxy server(ec2) .
below steps i have tried to achieve that :
1) Created Ec2 (ubuntu ) instance in same vpc which elastic domains are reside.
2) installed nginx in instance.
3) unlinked the Default - site enabled folder
4) created elasticsearch config file.
config file :
server {
listen 80;
location /test/{
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
rewrite ^/test/(.*) $1 break;
proxy_pass https://elastic-endpoint.test.amazonaws.com;
}
location /prod/{
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
rewrite ^/prod/(.*) $1 break;
proxy_pass https://elastic-endpoint.prod.amazonaws.com;
}
}
5) by trying ngnix -t i am getting
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
6) sudo service nginx reload
7) after trying that i am getting 404 not found error
Can anyone please assist me
Thanks
Sai