diff --git a/server/nginx_webserver/htaccess.md b/server/nginx_webserver/htaccess.md new file mode 100644 index 0000000..4175a32 --- /dev/null +++ b/server/nginx_webserver/htaccess.md @@ -0,0 +1,20 @@ +On live sites + +/home//auth/.htpasswd + +To create a new .htpasswd file +htpasswd -c /home//auth/.htpasswd + +To add a new user/change the password +htpasswd .htpasswd + +`location /status { + auth_basic "filename"; + auth_basic_user_file /home//auth/.htpasswd; + allow ; + 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.