Jenkins reverse proxy on single domain with multiple apps

kefiras@gmail.com nginx-forum at forum.nginx.org
Mon Feb 26 14:58:26 UTC 2018


It was just an example, app1 or app2 may be any app, eg. zabbix or another
web server.
I have left the basic config for troubleshooting, my proxy pass is just as
per below:

  location /jenkins {
      proxy_pass http://jenkins:8080;
 }

The very first GET is:

---
curl  http://localhost:8123/jenkins       
                                                                            
                                             
<html><head><meta http-equiv='refresh'
content='1;url=/login?from=%2Fjenkins'/><script>window.location.replace('/login?from=%2Fjenkins');</script></head><body
style='background-color:white; color:white;'>


Authentication required
<!--
You are authenticated as: anonymous
Groups that you are in:
  
Permission you need to have (but didn't): hudson.model.Hudson.Read
 ... which is implied by: hudson.security.Permission.GenericRead
 ... which is implied by: hudson.model.Hudson.Administer
-->

</body></html>                                                       
---

which tells the browser to go to http://localhost/login?from=%2Fjenkins but
it should be rewritten to http://localhost/jenkins/login?from=%2Fjenkins

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,278748,278769#msg-278769



More information about the nginx mailing list