I know i have asked this before but i dint get any answers for the question.So basically i have a node js app running on port 5000.I have successfully redirected this to port 8080 using the following haproxy configuration-
frontend http-in
mode http
bind *:8080
acl path-employeeList path_beg -i /
use_backend employeeList-backend if path-employeeList
backend employeeList-backend
mode http
option httplog
option forwardfor
server appserver1 206.189.22.155:5000
I can now access my app now at http://206.189.22.155:8080. But now in this url, instead of using the portnumber (8080) ,i want to access my app using a made up path name like /ProcessDesigner.ie,the app should be reachable at http://206.189.22.155/ProcessDesigner.
What i have tried so far
frontend http-in
mode http
bind *:8080
acl path-page-designer path_beg -i /ProcessDesigner
use_backend page-designer-backend if path-page-designer
backend page-designer-backend
mode http
option httplog
option forwardfor
http-request set-path /ProcessDesigner
server appserver1 206.189.22.155:5000
when I hit http://206.189.22.155/ProcessDesigner it says the site cannot be reached. I am doing this so that the user doesn't have to remember the port number and can just access using the pathname. So for this how should i change my configuration.Plz help by showing an example using my config!!
UPDATE using http to https redirection(80->443) and reqrep in the backend.
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 employeeList-backend if path-employeeList
backend employeeList-backend
mode http
option httplog
option forwardfor
reqrep ^([^\ :]+)\ /ProcessDesigner/?(.*)$ \1\ /\2
server appserver1 206.189.22.155:5000
Now with this updated configuration when i hit https://206.189.22.155/ it says 503 service unavailable ( No server is available to handle this request.) and when i hit https://206.189.22.155/ProcessDesigner I dont see any errors anymore but just a blank white page.Although I can see the tab name "sample" which indicates or atleast seems as if it has reached the application , there is no output but just a blank white screen.