From ec0eb180b82f5d8fa6384ba4b1002642d7c6d729 Mon Sep 17 00:00:00 2001 From: Nathan Steel Date: Fri, 17 Sep 2021 11:10:48 +0100 Subject: [PATCH] Add NGINX htaccess info --- server/nginx_webserver/htaccess.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 server/nginx_webserver/htaccess.md 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.