Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

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

$
0
0
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!

Viewing all articles
Browse latest Browse all 4759

Trending Articles