我有个和nginx有关的问题。我使用elasticsearch和Kibana存储和可视化数据。我想阻止使用nginx访问Kibana中选定的子页面。Kibana有几个子页面(应用程序):
我想给所有有一个密码的用户可视化,仪表板和Timelion子页面的权限。但我想阻止(使用不同的密码)发现,开发工具和管理子页面。我创建了三个文件。
kibana.conf:
server {
listen *:5611;
server_name localhost;
access_log /var/log/nginx/kibana-access.log;
error_log /var/log/nginx/kibana-error.log;
location / {
auth_basic "Access denied";
auth_basic_user_file /etc/nginx/conf.d/kibana.htpasswd;
proxy_pass localhost:5601;
}
location /app/kibana#/management {
auth_basic "Access denied";
auth_basic_user_file /etc/nginx/conf.d/kibana-admin.htpasswd;
proxy_pass localhost:5601;
}
location /app/kibana#/dev_tools {
auth_basic "Access denied";
auth_basic_user_file /etc/nginx/conf.d/kibana-admin.htpasswd;
proxy_pass localhost:5601;
}
location /app/kibana#/discover {
auth_basic "Access denied";
auth_basic_user_file /etc/nginx/conf.d/kibana-admin.htpasswd;
proxy_pass localhost:5601;
}
}问题是,当我在浏览器中打开localhost:5611并以用户“弹性”身份登录时,我对所有子页面都有权限。我应该在配置文件中更改什么来阻止用户“弹性”的管理子页面?用nginx有可能吗?
https://stackoverflow.com/questions/42623461
复制相似问题