Welcome! Log In Create A New Profile

Advanced

How to controlling what users can access under al proxied location?

Posted by alexolivan 
How to controlling what users can access under al proxied location?
May 20, 2015 10:05AM
Hi forum.

I open this thread as a follow on of a previous one, once I successfully "mounted" a remote kibana server under a location.
Here is the current, base, vhost setup that allows me to do so:

location /kibana/ {
subs_filter_types text/html text/css text/xml;
subs_filter href=" href="http://publicwebserver.example.com/kibana/;
subs_filter src=" src="http://publicwebserver.example.com/kibana/;

proxy_pass http://elkserver.example.net/;
proxy_read_timeout 90;
}

location /elasticsearch/ {
proxy_pass http://elkserver.example.net;
proxy_read_timeout 90;
}

With this setup, I can access fully transparently to an internal kibana web interface.
Now I want to put some limits to this vhost... I feel it should be easy... but i'm not succeeding.

What I would like is
- When we point the browser to http://publicwebserver.example.com/kibana the browser loads
http://publicwebserver.example.net/kibana/#/dashboards/MyFunnyExampleDashboard
-As a bonus, it would be great that any intent on browsing manually http://publicwebserver.example.net/kibana/XXXXXX
where XXXXX is any kind of browsing will result futile... 404, 403, ie, no access.

Actually, as soon as I play with my current setup, I screw the thing and it all fails... but at the same time, as is, the current setup is equivalent to punching some rules on a firewall an let everyone go directly to the elk server...

Can some Nginx guru help here!

Thank you very much!
Best regards!
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 151
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready