jenkins.io icon indicating copy to clipboard operation
jenkins.io copied to clipboard

Jenkins Reverse proxy - HAProxy outdated

Open MrDiba opened this issue 4 years ago • 3 comments
trafficstars

The examples for using Jenkins in combination with an HAProxy reverse proxy setup are outdated resulting in errors in the config when using a updated HAProxy environment.

parsing [/etc/haproxy/haproxy.cfg:110] : The 'reqrep' directive is not supported anymore since HAProxy 2.1. Use 'http-request replace-path', 'http-request replace-uri' or 'http-request replace-header' instead.
parsing [/etc/haproxy/haproxy.cfg:112] : The 'rspirep' directive is not supported anymore since HAProxy 2.1. Use 'http-response replace-header' instead.

Links

  • https://www.jenkins.io/doc/book/system-administration/reverse-proxy-configuration-haproxy/

MrDiba avatar Nov 08 '21 12:11 MrDiba

@MrDiba are you able to submit the pull request to the page based on the changes you needed to make?

MarkEWaite avatar Nov 10 '21 20:11 MarkEWaite

Hi @MarkEWaite To be honest is my knowledge about HAProxy very limited. I found a few stackoverflow posts about changing the affected lines: https://stackoverflow.com/questions/68092050/replace-regrep-for-haproxy-2-x https://stackoverflow.com/questions/59484910/haproxy-replace-rsprep-directive-by-http-response-replace-header But I was not be able to make it work so I gave up on it and installed an apache2 reverse proxy in front of it.

MrDiba avatar Nov 11 '21 09:11 MrDiba

I have done the local setup of both HAProxy & Jenkins and it took few hours to get this working with updated configuration as per new HAPROXY 2.6.6 version. PR raised: https://github.com/jenkins-infra/jenkins.io/pull/5619

Added the recording to visualize how it works

screen-recorder-thu-oct-20-2022-09-05-51.webm

ankurkumarz avatar Oct 20 '22 16:10 ankurkumarz