I have Hudson running and made available to the world via nginx. I have protected Hudson with nginx's auth_basic and that works great. The trouble is, I want to allow unauthenticated requests to the build URL, i.e. /job/<job_name>/build
.
Currently I have this in my nginx conf:
upstream hudson {
server 127.0.0.1:8888;
}
server {
server_name ci.myurl.com;
root /var/lib/hudson;
location / {
proxy_pass http://hudson/;
auth_basic "Super secret stuff";
auth_basic_user_file /var/opt/hudson/htpasswd;
}
location ~ \/build {
auth_basic off;
}
}
I can't get that second location to allow unauthenticated requests. I have tried various combinations of
location ~ /job/(.*)/biuld { }
location ^~ \/build { }
location ~ \/job\/(.*)\/build { }
etc...
Maddening!
Can anyone point me in the right direction?
Thanks,
Ad.