HAProxy use subdir of backend. <solved>

Started by swamp_ig, May 23, 2021, 03:56:20 AM

Previous topic - Next topic
May 23, 2021, 03:56:20 AM Last Edit: June 04, 2021, 09:28:11 AM by swamp_ig
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!

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.