HAProxy: Backend with subdirectory / subpath / subfolder? -
i trying achieve this:
http://front-end --> http://back-end/app-1 http://front-end/app-2 --> http://back-end/app-2-another-path
so requests handled way:
http://front-end/do-this --> http://back-end/app-1/do-this http://front-end/app-2/do-that --> http://back-end/app-2-another-path/do-that
how can this? thank you.
you can achieve "http://front-end/app-2/do-that --> http://back-end/app-2-another-path/do-that"
following configuration:
frontend http #match url ending /xxxxx/do-that acl do-that path_end -i /app-2/do-that use_backend server1 if do-that backend server1 reqirep ^([^\ :]*)\ /app-2/(.*) \1\ /app-2-another-path/\2 server server 168.192.x.x
here more information on reqirep.
Comments
Post a Comment