From 7df800cb8e2a3503ca56e11240d1300030e66661 Mon Sep 17 00:00:00 2001 From: kurets Date: Sat, 14 Sep 2024 17:18:55 +0300 Subject: [PATCH] update http auth, apache2 must be removed --- ...ed-access-with-http-basic-auth-nginx-and-apache.md | 11 ++++++++++- .../index.html | 11 ++++++++++- public/articles/index.xml | 11 ++++++++++- public/index.html | 2 +- public/index.xml | 11 ++++++++++- public/library/hackbook/index.xml | 11 ++++++++++- public/library/index.xml | 11 ++++++++++- public/library/ted-kaczynski/index.xml | 11 ++++++++++- public/tags/blog/index.xml | 11 ++++++++++- public/tags/hackbook/index.xml | 11 ++++++++++- public/tags/index.xml | 11 ++++++++++- public/tags/library/index.xml | 11 ++++++++++- public/tags/personal/index.xml | 11 ++++++++++- public/tags/ted-kaczynski/index.xml | 11 ++++++++++- public/tags/updates/index.xml | 11 ++++++++++- 15 files changed, 141 insertions(+), 15 deletions(-) diff --git a/content/articles/blog/restrict-unwanted-access-with-http-basic-auth-nginx-and-apache.md b/content/articles/blog/restrict-unwanted-access-with-http-basic-auth-nginx-and-apache.md index 1a9380c6..3ae1153c 100644 --- a/content/articles/blog/restrict-unwanted-access-with-http-basic-auth-nginx-and-apache.md +++ b/content/articles/blog/restrict-unwanted-access-with-http-basic-auth-nginx-and-apache.md @@ -11,16 +11,25 @@ The guide is meant for debian but can be easily adapted to suit your needs. I as ## Create a username and password for authentication (*or more than 1 user*) First: + ```bash sudo apt install apache2 ``` -Then: +Apache2 is only needed to create its files in /etc/ otherwsie apache2-utils commands below will fail. My configuration uses NGINX so I'll delete apache2. + +Second: ```bash sudo apt install apache2-utils ``` +Third: + +```bash +sudo apt remove apache2 +``` + Create a username you wish to authenticate with the following comnmand: ```bash diff --git a/public/articles/blog/restrict-unwanted-access-with-http-basic-auth-nginx-and-apache/index.html b/public/articles/blog/restrict-unwanted-access-with-http-basic-auth-nginx-and-apache/index.html index b5277b4f..507ed4c6 100644 --- a/public/articles/blog/restrict-unwanted-access-with-http-basic-auth-nginx-and-apache/index.html +++ b/public/articles/blog/restrict-unwanted-access-with-http-basic-auth-nginx-and-apache/index.html @@ -36,7 +36,8 @@ Create a username and password for authentication (or more than 1 user) First:"/
sudo apt install apache2
-

Then:

+

Apache2 is only needed to create its files in /etc/ otherwsie apache2-utils commands below will fail. My configuration uses NGINX so I’ll delete apache2.

+

Second:

@@ -44,6 +45,14 @@ Create a username and password for authentication (or more than 1 user) First:"/
sudo apt install apache2-utils
+

Third:

+ + + +
+ +
sudo apt remove apache2
+

Create a username you wish to authenticate with the following comnmand:

diff --git a/public/articles/index.xml b/public/articles/index.xml index 50a77a5a..dc9e70b9 100644 --- a/public/articles/index.xml +++ b/public/articles/index.xml @@ -26,7 +26,8 @@ <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo apt install apache2</span></span></code></pre></div> -<p>Then:</p> +<p>Apache2 is only needed to create its files in /etc/ otherwsie apache2-utils commands below will fail. My configuration uses NGINX so I&rsquo;ll delete apache2.</p> +<p>Second:</p> @@ -34,6 +35,14 @@ <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo apt install apache2-utils</span></span></code></pre></div> +<p>Third:</p> + + + + <div class="highlight"> + + <pre tabindex="0" class="chroma"><code class="language-bash" data-lang="bash"><span style="display:flex;"><span>sudo apt remove apache2</span></span></code></pre></div> + <p>Create a username you wish to authenticate with the following comnmand:</p> diff --git a/public/index.html b/public/index.html index 8fa97891..1385f8c3 100644 --- a/public/index.html +++ b/public/index.html @@ -37,7 +37,7 @@ datetime="2024-09-05T17:05:07+03:00" style="font-family: monospace; font-size: 1rem;">2024 Sep 05 – Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache - Here’s how to only allow authenticated users to view your websites - great way to boot freeloaders and guarantee your system’s (or your … Read - more about Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache (1 minute read). + more about Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache (2 minute read).
  • Block and Filter Spam Requests With User-Agents in NGINX -