Hi.

I am hosting a jenkins on https://www.mysite.com/jenkins/ with a NGinx 
reverse proxy. I recently updated http to httpS and upgraded Jenkins to the 
current latest, plugins as well.

When I try to access the "Manage Jenkins" page, all subsequent requests 
fails with error 401. This only happens after the AJAX call verifying the 
reverse proxy setup has failed. Apart from that one, everything works just 
fine. With an SSH forwarding and direct access (with login), it works too.

>From the specific help page 
<https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+says+my+reverse+proxy+setup+is+broken>,
 
I tried the suggested request:
curl -iL -u user:pass -e https://www.mysite.com/jenkins/manage 
https://www.mysite.com/jenkins/administrativeMonitor/hudson.diagnosis.ReverseProxySetupMonitor/test

Result:

> HTTP/1.1 302 Found
> Server: nginx/1.1.19
> Date: Mon, 22 Sep 2014 14:50:45 GMT
> Content-Length: 0
> Connection: keep-alive
> Cache-Control: private
> Expires: Thu, 01 Jan 1970 01:00:00 CET
> Location: 
> https://www.mysite.com/jenkins/administrativeMonitor/hudson.diagnosis.ReverseProxySetupMonitor/testForReverseProxySetup/https%3A%2F%2Fwww.mysite.com%2Fjenkins%2Fmanage/
> Front-End-Https: on
> Cache-Control: public, must-revalidate
> Strict-Transport-Security: max-age=2592000; includeSubdomains
>
 

> HTTP/1.1 404 Not Found
> Server: nginx/1.1.19
> Date: Mon, 22 Sep 2014 14:50:45 GMT
> Content-Type: text/html;charset=utf-8
> Content-Length: 1053
> Connection: keep-alive
> Cache-Control: private
> Expires: Thu, 01 Jan 1970 01:00:00 CET
> Content-Language: en


Given that the Location returns https://www.mysite.com/jenkins/... rather 
than localhost:8080, I would say that it's properly configured. Yet, it 
ends up with a 404.

Here is the NGinx extract:

>         location /jenkins {
>                 proxy_pass              http://localhost:8080/jenkins;
>                 proxy_redirect http:// https://;
>                 sendfile off;
>                 proxy_set_header        Host $host;
>                 proxy_set_header        X-Real-IP $remote_addr;
>                 proxy_set_header        X-Forwarded-For 
> $proxy_add_x_forwarded_for;
>                 proxy_max_temp_file_size 0;
>                 proxy_set_header        X-Forwarded-Proto $scheme;
>                 proxy_connect_timeout   150;
>                 proxy_send_timeout      100;
>                 proxy_read_timeout      100;
>                 proxy_buffers           4 32k;
>                 client_max_body_size    8m;
>                 client_body_buffer_size 128k;
>
 

>                 auth_basic "mysite login";
>                 auth_basic_user_file "/etc/nginx/mysite.passwd";
>         }


(I normally have an LDAP server) 

Does anyone know what could be wrong ? Or how to disable the test ?

Thanks
Eric.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to