So basically I have 2 different applications running on port 5000 and 30000 on a single ubuntu server respectively.Both these application has to be mapped using haproxy.
what i have tried so far-
frontend http-in
mode http
bind *:80
bind *:443 ssl crt /etc/ssl/private/mydomain.pem
http-request redirect scheme https code 301 if !{ ssl_fc }
acl path-employeeList path_beg -i /ProcessDesigner
use_backend backend1 if path-employeeList
acl path-employeeListfinal path_beg -i /ProcessCore
use_backend backend2 if path-employeeListfinal
backend backend1
mode http
option httplog
option forwardfor
reqrep ^([^\ :]+)\ /ProcessDesigner/?(.*)$ \1\ /\2
server backend1 206.189.22.155:30000
backend backend2
mode http
option httplog
option forwardfor
reqrep ^([^\ :]+)\ /ProcessCore/?(.*)$ \1\ /\2
server backend2 206.189.22.155:5000
Now here /ProcessDesigner and /ProcessCore is just a alias/made up name. Currently https://206.189.22.155/ProcessDesigner is showing only partial output (i mean some parts of the page fail to load because of 503 error service unavailable) and the second app at https://206.189.22.155/ProcessCore is also showing no output.(just a white blank screen).
Note: If i add the below mentioned lines to my frontend
acl path-employeeListnew path_beg -i /
use_backend backend1 if path-employeeListnew
Then in this case the application at https://206.189.22.155/ProcessDesigner works properly and i can see the complete output.But this fix is not a proper fix because now if i hit https://206.189.22.155/ProcessCore i get 404 not found error. The only case when https://206.189.22.155/ProcessCore works is when i use the below configration-
frontend http-in
mode http
bind *:80
bind *:443 ssl crt /etc/ssl/private/mydomain.pem
http-request redirect scheme https code 301 if !{ ssl_fc }
acl path-employeeListnew path_beg -i /
use_backend backend2 if path-employeeListnew
acl path-employeeListfinal path_beg -i /ProcessCore
use_backend backend2 if path-employeeListfinal
backend backend2
mode http
option httplog
option forwardfor
reqrep ^([^\ :]+)\ /ProcessCore/?(.*)$ \1\ /\2
server backend2 206.189.22.155:5000
Therefore at any given time i am able to map only a single application and not multiple applications. Plz help as i dont think there is anything to change within the application itself rather i believe there is something wrong with my haproxy configuration.