you can just use multiple locations and assign them to the same HTTP Server//docs/musicEach of them has a different upstream.
Just use the default match type. Yours is not a regular expression.The default is path contains.
goal of stripping it of the "/docs" so that it is seen by the upstream as simply the base address of just stuff.example.com/
rewrite ^/docs(.*)$ $1 break;
location /music/ { proxy_pass http://UpstreamForMusicSiteUID/; # trailing slash is the key for dir stripping}
understood thanks!that's nifty!(want to test this in plugin - how variable will be passed to proxy_pass directive via config\template)but @always_learning wants to switch upstreams by the "/context"so it seems to me that this method is not suitable in this caseso in the context of the question (switching upstreams by dir name and cutting out the dir name) it might even be easier like:Code: [Select]location /music/ { proxy_pass http://UpstreamForMusicSiteUID/; # trailing slash is the key for dir stripping}need to test how it will work with just "/" in "Path Prefix" field.
I'm happy to test this idea, but how would I get it to work from the GUI?
just not where/how to do the proxy pass
Quotejust not where/how to do the proxy passOPNsense generates it for you in /usr/local/etc/nginx/nginx.conf based on GUI parameters )
Is there a secondary location?
while I can find the basic server configuration, the location configuration for /docs/, is nowhere to be found.