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

Re: Nginx as reverse proxy - must point to different web servers

$
0
0
Hello Doctau,

I'm relatively new to nginx as well, but I think I can propose a solution to your problem. You could use a regular expression (flagged by ~) in your location path to match both /supervision and /nagios:

location ~ ^(/supervision|/nagios) {
---> // your config here
}

I haven't tested this, but I hope my regex fu hasn't failed me. The ^ character says that the match should start at the beginning of the given path expression, so it matches /supervision/bla and /nagios/bla but not /take/me/to/supervision or /hidden/nagios/hack.

For more info on the available options for the _location_ directive, check out the wiki page at http://wiki.nginx.org/HttpCoreModule#location.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>