OPNsense Forum

English Forums => Web Proxy Filtering and Caching => Topic started by: swamp_ig on May 23, 2021, 03:56:20 AM

Title: HAProxy use subdir of backend. <solved>
Post by: swamp_ig on May 23, 2021, 03:56:20 AM
Hi,

I can't quite figure out how to make this work:

Public URL:  https://backend.myservice.com/
Internal Server: http://backend.myservice.local/subdir/

I can get the SSL offloading working fine, but I can't figure out how to make the backend always go to a subdirectory, it always ends up in the root directory. A redirect isn't what I want either really.

Thanks for your help!
Title: Re: HAProxy use subdir of backend.
Post by: swamp_ig on June 04, 2021, 09:27:53 AM
Figured this out.

Needs a rule saying path doesn't start with the subdir, and then a condition with execute function set path "/subdir/%[path]" if the condition is false.