Re: Hide Jenkins on port 8080 behind NGINX using proxy_pass ?

2015-10-16 Thread edofthemountain
The chef utility that gitlab uses is useful. I added my location proxy_pass to the following template, and when I run gitlab-ctl reconfigure it now includes it. /opt/gitlab/embedded/cookbooks/gitlab/recipes/nginx-gitlab-http.conf.erb All is good! Problem solved. Thank you Nurahmadie ! Posted a

Re: Hide Jenkins on port 8080 behind NGINX using proxy_pass ?

2015-10-16 Thread Francisco V.
Hi, not 100% sure about it, but usually when you use reverse proxy capabilities, URIs must match because that is what is used to know where to pass the request. For example, if your backend is 1.1.1.1/foo, you will have to redirect from somedomain.com/foo Redirecting without specific URIs like so

Re: Hide Jenkins on port 8080 behind NGINX using proxy_pass ?

2015-10-16 Thread Nurahmadie Nurahmadie
On Fri, Oct 16, 2015 at 11:24 PM, Nurahmadie Nurahmadie < nurahma...@gmail.com> wrote: > Well, in that case it's more like the whole gitlab-http server is > overriding your jenkins server block. > > Assuming your jenkins reverse proxy is configured like this: > > server { >listen 80; >list

Re: Hide Jenkins on port 8080 behind NGINX using proxy_pass ?

2015-10-16 Thread Nurahmadie Nurahmadie
Well, in that case it's more like the whole gitlab-http server is overriding your jenkins server block. Assuming your jenkins reverse proxy is configured like this: server { listen 80; listen [::]:80 default ipv6only=on; location /jenkins/ { proxy_set_header X-Forwarded-For $proxy

Re: Hide Jenkins on port 8080 behind NGINX using proxy_pass ?

2015-10-16 Thread edofthemountain
Thank you for your help Nurahmadi. I will look for gitlab forum solutions. If I move the following location section inside the gitlab-http.conf file both GitLab and Jenkins proxy_pass will works Assuming that modifying the omnibus version of gitlab-http.conf is the only way to make it work, then

Re: Hide Jenkins on port 8080 behind NGINX using proxy_pass ?

2015-10-16 Thread edofthemountain
Thank you for your reply. I am not sure I understand. I do know Jenkins proxy_pass will work if I do the following: 1 - gitlab-ctl stop 2 - Comment-out the "#include gitlab-http.conf" in the nginx.conf file 3 - gitlab-ctl start 4 - http://localhost/jenkins takes me to http://localhost:8081/jen

Re: Hide Jenkins on port 8080 behind NGINX using proxy_pass ?

2015-10-16 Thread Nurahmadie Nurahmadie
Are you sure it's nginx problem? gitlab omnibus is using embedded chef solo to provision nginx with configuration templates and whatnot. It's out of the scope of nginx configuration itself. You should really check if your nginx configuration for jenkins actually included to the main nginx config,

Re: Hide Jenkins on port 8080 behind NGINX using proxy_pass ?

2015-10-16 Thread edofthemountain
Is there a NGINX configuration command to exclude listening for /jenkins/ in the gitlab-http.conf ? Something in the gitlab-http.conf is preventing my proxy_pass from working in nginx-jenkins.conf ? Posted at Nginx Forum: https://forum.nginx.org/read.php?2,262255,262280#msg-262280 _

Help with location context?

2015-10-16 Thread de_nginx_noob
So this is my nginx.conf file : http { log_format main '$remote_addr - $remote_user [$time_local] "$request" ' '$status $body_bytes_sent "$http_referer" ' '"$http_user_agent" "$http_x_forwarded_for"'; access_log /var/log/nginx/access.log mai

Re: Hide Jenkins on port 8080 behind NGINX using proxy_pass ?

2015-10-16 Thread edofthemountain
Sorry typo in posting... Shouldn't the following result in http://127.0.0.1/test1 passing to http://google.com ? It does not. It redirects back to 127.0.0.1 server { listen *:80; location /test1/ { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Hos

Re: Hide Jenkins on port 8080 behind NGINX using proxy_pass ?

2015-10-16 Thread edofthemountain
I am trying to simplify my proxy_pass problem and eliminate port issues. Shouldn't the following result in http://127.0.0.1/test1 passing to http://google.com ? It redirects back to 127.0.0.1 server { listen *:80; location /test1127.0.0.1/ { proxy_set_header X-Forwarded-For $proxy_a