location /es/ {
proxy_pass http://172.16.1.203:9200/;
auth_basic "nginx status";
auth_basic_user_file /usr/local/nginx/conf/htpasswd;
}
location /es-head/ {
proxy_pass http://172.16.1.203:9100/;
auth_basic "nginx status";
auth_basic_user_file /usr/local/nginx/conf/htpasswd;
}
location /kibana/ {
proxy_set_header Host $host;
rewrite /kibana/(.*)$ /$1 break;
proxy_pass http://172.16.1.203:5601/;
auth_basic "nginx status";
auth_basic_user_file /usr/local/nginx/conf/htpasswd;
}
主要是Kibana需要修改:server.basePath属性