jenkins.io
jenkins.io copied to clipboard
Jenkins Reverse proxy - HAProxy outdated
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 are you able to submit the pull request to the page based on the changes you needed to make?
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.
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