How to configure Kibana behind nginx balancer

Hi to everyone,

I have recently configured ELK in our enterprise environment. I have configured Kibana by default, without making changes, so to access Kibana, I do it by the configured host name and port:


I have reviewed the documentation, and I already know how to configure an nginx in the ELK server so that it goes through port 80 and not 5601, and avoid adding that port every time you want to access Kibana.

Now the only thing left for me to configure is the following. All the applications that we have mounted, in front of them, have an nginx balancer, which depending on the request you make, takes you to one application server or another. What I want to know is if Kibana can be configured to be accessible from the URL for example
In the nginx balancer, you would have a location to /apps/kibana and from there send the requests to the final kibana server.

How can I implement this solution? The version of ELK that I have installed is 8.0 on Ubuntu servers.

Thank you very much in advance.

The server.basePath setting can do that: Configure Kibana | Kibana Guide [master] | Elastic