pfSense & HAPROXY redirection to specific subdirectory on specific port

hello all,

i’m looking for help plz in configuring my following scenario on pfsens with HAProxy.
now, i’m running my domain1 with acme ssl & using HAProxy,
h ttps://domain1:443 ==> h ttp://192.168.1.13:80
everything is fine and the domain1 is working on https.

now, i need to run an new service on the same domain1 on port 8080 to a specific path:
http://192.168.1.13.com:8080/subfolder1/subfolder2

from outside, the users will request the new service on:
h ttps://domain1.com (on 443 of course)

i have prepared another domain name (domain2.com) trying to run the above scenario…got blue and nothing worked with me to run the new service on another port with a specific path…!!

can i find help here :frowning:

thanks in advanced.

I believe you will need to add the following into the backend section under Backend pass thru

http-request set-path subfolder1/subfolder2%[path]

1 Like

indeed, i guess, i miss something in settings the http-request set-path at BackEnd !!
special with port !

a screenshot of my BackEnd fonfig. :

something i did wring in my backend settings in here !

No, as I mentioned above you need to set this under the Backend pass through section under advanced.

1 Like

thanks a lot xMAXIMUSx for your reply & help, appreciate it dude :slight_smile:

i did what you mentioned above, as following:

my server 192.168.0.13 runs on port 80 for the main website.
what i need to do is to run a new service on the same server, BUT, on port 8080 to a specific path as following:
http://192.168.1.13.com:8080/subfolder1/subfolder2
the pathe of the new service above is working fine locally, but from out side, still facing troubles with backend settings…

what i missed with my settings??!!

appreciate your hepl

i do really appreciate your help :+1: :blush:
finally it worked for me.
my problem was in the port 8080 with TomCat apache, i just changed the port to 8081, reboot the server, and its worked.

by the way, it’s working on both as Action & Backend pass thru just fine

again, thanks a lot @xMAXIMUSx for your help

2 Likes