Opened 3 years ago

Last modified 3 years ago

#781 new task

Documentation not clear on auth_basic_user_file

Reported by: r.luthiger@… Owned by:
Priority: minor Milestone:
Component: documentation Version: 1.9.x
Keywords: documentation Cc:
uname -a:
nginx -V: doesn't matter

Description

On the page http://nginx.org/en/docs/http/ngx_http_auth_basic_module.html it is not very clear to what auth_basic_user_file is relative to.

Where exactly needs the file htpasswd to be when it is defined like this:

auth_basic_user_file conf/htpasswd;

is it /etc/nginx/conf/htpasswd or something else?

Change History (3)

comment:1 Changed 3 years ago by i.bakirov@…

Path is relative to nginx installation path, where nginx resides on OS. Also you can configure absolute path to files.

Examples:

1- nginx installed on OS in /etc/nginx - conf like auth_basic_user_file conf/htpasswd; then file is located in /etc/nginx/conf/htpasswd

2- nginx installed on OS in /opt/nginx - conf like auth_basic_user_file conf/htpasswd; then file is located in /opt/nginx/conf/htpasswd

3- nginx installed on OS in /usr/local/etc/nginx - conf like auth_basic_user_file /myfolder/conf/htpasswd; then file is located in /myfolder/conf/htpasswd

4- nginx installed on OS in C:\apps\nginx - conf like auth_basic_user_file conf/htpasswd; then file is located in C:\apps\nginx\conf\htpasswd

5- nginx installed on OS in C:\apps\nginx - conf like auth_basic_user_file C:/myfolder/conf/htpasswd; then file is located in C:\myfolder\conf\htpasswd

comment:2 Changed 3 years ago by maxim

  • Milestone 1.9.5 deleted

Ticket retargeted after milestone closed

comment:3 Changed 3 years ago by mdounin

  • Component changed from other to documentation
Note: See TracTickets for help on using tickets.