You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
494 B
Markdown
21 lines
494 B
Markdown
On live sites
|
|
|
|
/home/<user>/auth/.htpasswd
|
|
|
|
To create a new .htpasswd file
|
|
htpasswd -c /home/<user>/auth/.htpasswd
|
|
|
|
To add a new user/change the password
|
|
htpasswd .htpasswd <user>
|
|
|
|
`location /status {
|
|
auth_basic "filename";
|
|
auth_basic_user_file /home/<user>/auth/.htpasswd;
|
|
allow <ip>;
|
|
deny all;
|
|
satisfy any;
|
|
...
|
|
}`
|
|
|
|
The above settings are the same style as .htaccess with the auth_basic_user_file pointing to the .htpasswd file in the first step.
|