Hide Jenkins on port 8080 behind NGINX using proxy_pass ?

edofthemountain nginx-forum at nginx.us
Thu Oct 15 21:42:56 UTC 2015


How can I configure NGINX to pass

http://172.17.144.123/jenkins
to this
http://172.17.144.123:8080/jenkins

I have Gitlab + NGINX and Jenkins running on the same CentOS 6.7 machine.

I access Jenkins with the following URL:
http://172.17.144.123:8080/jenkins/

GitLab opens using this URL:
http://172.17.144.123

I tried the following without success.

# This does NOT work.  What I am missing?
server {
   listen 80;
   listen [::]:80 default ipv6only=on;

   location /jenkins/ {
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_pass http://172.17.144.123:8080/;
   }
}


I installed the NGINX that came with GITLAB.  

Is module ngx_http_proxy_module something that is an add-on?  That I install
separately?

Thanks in advance,

-Ed

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



More information about the nginx mailing list