jenkins-infra / jenkins.io

A static site for the Jenkins automation server
https://jenkins.io
Other
320 stars 1.21k forks source link

Jenkins Reverse proxy - HAProxy outdated #4703

Open MrDiba opened 2 years ago

MrDiba commented 2 years ago

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

MarkEWaite commented 2 years ago

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

MrDiba commented 2 years ago

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.

ankurkumarz commented 1 year ago

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