Jenkins listens on 192.168.2.57:9000 . Now my HAPROxy configured on another machine is has been updated with virtual path
frontend http-in bind *:80 option http-server-close option forwardfor acl has_jenkins path_beg /jenkins use_backend jenkins_server if has_jenkins backend jenkins_server balance roundrobin option forwardfor server jenkins 192.168.2.57:9000
When I hit /jenkins , page come up with BAD REQUEST. The issue is the actual server does not serve with /jenkins. Hence I need to strip /jenkins and send the request to backend . So I did this
reqrep ^([^\ ]*\ /)jenkins[/]?(.*) \1\2
The page does not load either , but now no BAD REQUEST . Instead I just get blank page , but when I press F12 I can see in the console and the request headers coming up . The URL now in there /css , which is not good as it needs to be 192.168.2.57:9000/css , to make it work .
The links in the page still points to , which is not the actual server where it is hosted and fails subsequently