Я прокидываю порт со внешки до nginx. Elasticsearch воспринимает путь по которому nginx редирект делает как параметр поиска индекса.
Отправляю конфиг nginx:
events {
worker_connections 1024;
}
http {
server {
listen 443 ssl; # managed by Certbot
server_name server.***.com;
ssl_certificate /etc/letsencrypt/live/server.stmacarons.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/server.stmacarons.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
location / {
proxy_pass http://127.0.0.1:5601;
}
location /elastic {
proxy_pass http://127.0.0.1:9200;
}
}
server {
listen 80;
server_name server.***.com;
location / {
proxy_pass https://127.0.0.1:443;
}
}
}
При попытке обращения к server.***.com/elastic возвращается ошибка:
{"error":{"root_cause":[{"type":"index_not_found_exception","reason":"no such index [elasticsearch]","resource.type":"index_or_alias","resource.id":"elasticsearch","index_uuid":"_na_","index":"elasticsearch"}],"type":"index_not_found_exception","reason":"no such index [elasticsearch]","resource.type":"index_or_alias","resource.id":"elasticsearch","index_uuid":"_na_","index":"elasticsearch"},"status":404}