patterndockerMinor
Jenkins Docker Behind Reverse Proxy Adds ":80" to the URL
Viewed 0 times
theproxyreversejenkinsdockeraddsbehindurl
Problem
The Jenkins container redirects to
I have tried the proxy with a simple web app and there were no issues.
This is the
The cert is correctly issued and the connection is secured. The host I'm using is live and correctly configured with ports 80 and 443 open.
The container exposes
Also, I would have assumed that accessing an address with
If this helps this is the logs when I run
Here are the logs when I try to do the first login, the space is before I remove the
How can I resolve this problem?
URL:80, which is causing an error. When I remove the :80, everything is working as it should.I have tried the proxy with a simple web app and there were no issues.
This is the
docker-compose.yml https://pastebin.com/djJTuBZL.The cert is correctly issued and the connection is secured. The host I'm using is live and correctly configured with ports 80 and 443 open.
The container exposes
8080 and this is the same as the VIRTUAL_PORT.Also, I would have assumed that accessing an address with
:80 wouldn't have caused any issues this being the standard HTTP port eg www.google.com:80; unless I'm missing something.If this helps this is the logs when I run
docker-compose up https://pastebin.com/NUbDL7PC.Here are the logs when I try to do the first login, the space is before I remove the
:80 then load the page https://pastebin.com/0wxGDBzi.How can I resolve this problem?
Solution
If it's a brand new Jenkins, you can try creating an SSH tunnel directly into the container with port 8080 and checking if the problem also appears there. That will at least allow you to check if it's Jenkins redirecting you or Nginx.
There you can also try adjusting "Jenkins URL" in "Manage Jenkins" -> "Configure System".
Alternatively, check
There you can also try adjusting "Jenkins URL" in "Manage Jenkins" -> "Configure System".
Alternatively, check
jenkins_home/jenkins.model.JenkinsLocationConfiguration.xml. jenkinsUrl tag is also present there.Context
StackExchange DevOps Q#11730, answer score: 1
Revisions (0)
No revisions yet.