Hello,
I got an admin panel and a front for user
url admin panel : localhost:81
url front : localhost:82
So for practicity i did add in my host : 127.0.0.1 domain.com, but i still have the port
What i want to do is to use haproxy to rewrite the url for both app like remove the port and make the url front to “domain.com” and url admin panel “domain.com/admin”
here my actual haproxy.cfg but it don’t work and i don’t understand why, of course i tried to access it with domain.com/back or domain.com/front:
global
defaults
mode http
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
frontend http-in
bind *:80
acl has_back path_beg /back
acl has_front path_beg /front
use_backend back if has_back
use_backend front if has_front
default_backend back
backend back
reqrep ^([^\ ]*\ /)back[/]?(.*) \1\2
server back back:80 check
backend front
reqrep ^([^\ ]*\ /)front[/]?(.*) \1\2
server front front:80 check
Thanks in advance