Hide Jenkins on port 8080 behind NGINX using proxy_pass ?

Nurahmadie Nurahmadie nurahmadie at gmail.com
Thu Oct 15 21:55:15 UTC 2015


Hi ed,

On Fri, Oct 16, 2015 at 4:42 AM, edofthemountain <nginx-forum at nginx.us>
wrote:

> 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/;
>
         # You want to remove the slash here   ^
         #
http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass

>    }
> }
>
>
> 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
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



-- 
regards,
Nurahmadie
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20151016/1d0d9022/attachment.html>


More information about the nginx mailing list