﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
387	auth_basic_user_file is relative not from prefix given by -p key	Тарас Буник		"I have following in config:
{{{
    location /supervisor/ {
        proxy_pass http://localhost:9001;
        proxy_redirect off;
        auth_basic ""please log in"";
        auth_basic_user_file ./htpasswd;
    }
}}}

I start nginx like this: {{{sudo nginx -p /home/user/project/ }}}

htpasswd lies at {{{/home/user/project/htpasswd}}}

But in nginx error log I see this:
{{{
2013/07/24 17:47:43 [error] 5912#0: *20 no user/password was provided for basic authentication, client: 127.0.0.1, server: _, request: ""GET /supervisor/ HTTP/1.1"", host: ""localhost:3306""
2013/07/24 17:47:43 [error] 5912#0: *20 open() ""/etc/nginx/./htpasswd"" failed (2: No such file or directory), client: 127.0.0.1, server: _, request: ""GET /supervisor/ HTTP/1.1"", host: ""localhost:3306""
2013/07/24 17:48:18 [error] 5912#0: *21 no user/password was provided for basic authentication, client: 127.0.0.1, server: _, request: ""GET /supervisor/ HTTP/1.1"", host: ""localhost:3306""
2013/07/24 17:48:18 [error] 5912#0: *21 open() ""/etc/nginx/./htpasswd"" failed (2: No such file or directory), client: 127.0.0.1, server: _, request: ""GET /supervisor/ HTTP/1.1"", host: ""localhost:3306""
}}}"	defect	closed	major		nginx-core	1.2.x	invalid	auth-basic		"Linux lubuntuk 3.8.0-26-generic #38-Ubuntu SMP Mon Jun 17 21:43:33 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
"	"nginx version: nginx/1.2.6 (Ubuntu)
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --with-pcre-jit --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-ipv6 --with-sha1=/usr/include/openssl --with-md5=/usr/include/openssl --with-mail --with-mail_ssl_module --add-module=/build/buildd/nginx-1.2.6/debian/modules/nginx-auth-pam --add-module=/build/buildd/nginx-1.2.6/debian/modules/nginx-echo --add-module=/build/buildd/nginx-1.2.6/debian/modules/nginx-upstream-fair --add-module=/build/buildd/nginx-1.2.6/debian/modules/nginx-dav-ext-module
"
