Compare commits
2 commits
f45fd51e1e
...
778e94eed1
Author | SHA1 | Date | |
---|---|---|---|
778e94eed1 | |||
7df800cb8e |
16 changed files with 143 additions and 17 deletions
|
@ -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
|
||||
|
|
|
@ -24,7 +24,7 @@ Create a username and password for authentication (or more than 1 user) First:"/
|
|||
|
||||
</div>
|
||||
|
||||
<small><em><p style="color: var(--muted_text);">作成日: <time datetime="2024-09-05T17:05:07+03:00" style="color: var(--muted_text);">2024年9月5日 (木)</time>; 最終更新日: <time datetime="2024-09-13T17:00:58+03:00" style="color: var(--muted_text);">2024年9月13日 (金)</time> </p></em></small>
|
||||
<small><em><p style="color: var(--muted_text);">作成日: <time datetime="2024-09-05T17:05:07+03:00" style="color: var(--muted_text);">2024年9月5日 (木)</time>; 最終更新日: <time datetime="2024-09-14T17:18:55+03:00" style="color: var(--muted_text);">2024年9月14日 (土)</time> </p></em></small>
|
||||
<div class="post-content"><p>Here’s how to only allow authenticated users to view your websites - great way to boot freeloaders and guarantee your system’s (<em>or your vps’</em>) resources for yourself.</p>
|
||||
<p>The guide is meant for debian but can be easily adapted to suit your needs. I assume you have followed Luke Smith’s tutorial and have NGINX running with certbot for certificates.</p>
|
||||
<h2 id="create-a-username-and-password-for-authentication-or-more-than-1-user">Create a username and password for authentication (<em>or more than 1 user</em>)<a hidden class="anchor" aria-hidden="true" href="#create-a-username-and-password-for-authentication-or-more-than-1-user">#</a></h2>
|
||||
|
@ -36,7 +36,8 @@ Create a username and password for authentication (or more than 1 user) First:"/
|
|||
|
||||
<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’ll delete apache2.</p>
|
||||
<p>Second:</p>
|
||||
|
||||
|
||||
|
||||
|
@ -44,6 +45,14 @@ Create a username and password for authentication (or more than 1 user) First:"/
|
|||
|
||||
<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>
|
||||
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
datetime="2024-09-05T17:05:07+03:00" style="font-family: monospace; font-size: 1rem;">2024 Sep 05</time> –
|
||||
<a href="/articles/blog/restrict-unwanted-access-with-http-basic-auth-nginx-and-apache/" aria-label="Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache Here’s how to only allow authenticated users to view your websites - … ... Click to Read more about Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache"><b class="white_span">Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache</b></a> - <span
|
||||
class="muted_text">Here’s how to only allow authenticated users to view your websites - great way to boot freeloaders and guarantee your system’s (or your …</span> <a href="/articles/blog/restrict-unwanted-access-with-http-basic-auth-nginx-and-apache/" aria-label="Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache Here’s how to only allow authenticated users to view your websites - … ... Click to Read more about Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache" class="read_more_recent_posts" style="box-shadow: 0 1px 0;">Read
|
||||
more about Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache</a> <em> (1 minute read).</em> </li>
|
||||
more about Restrict Unwanted Access With HTTP Basic Authentication - NGINX and Apache</a> <em> (2 minute read).</em> </li>
|
||||
<li><time
|
||||
datetime="2024-09-05T16:58:04+03:00" style="font-family: monospace; font-size: 1rem;">2024 Sep 05</time> –
|
||||
<a href="/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/" aria-label="Block and Filter Spam Requests With User-Agents in NGINX My server has been getting bussyblasted by spam requests from bots and … ... Click to Read more about Block and Filter Spam Requests With User-Agents in NGINX"><b class="white_span">Block and Filter Spam Requests With User-Agents in NGINX</b></a> - <span
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,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>
|
||||
|
||||
|
||||
|
||||
|
@ -35,6 +36,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>
|
||||
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,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>
|
||||
|
||||
|
||||
|
||||
|
@ -35,6 +36,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>
|
||||
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
<url>
|
||||
<loc>https://vodoraslo.xyz/articles/blog/restrict-unwanted-access-with-http-basic-auth-nginx-and-apache/</loc>
|
||||
<lastmod>2024-09-13T17:00:58+03:00</lastmod>
|
||||
<lastmod>2024-09-14T17:18:55+03:00</lastmod>
|
||||
</url><url>
|
||||
<loc>https://vodoraslo.xyz/articles/blog/block-and-filter-spam-requests-with-user-agents-in-nginx/</loc>
|
||||
<lastmod>2024-09-05T21:13:08+03:00</lastmod>
|
||||
|
|
|
@ -27,7 +27,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>
|
||||
|
||||
|
||||
|
||||
|
@ -35,6 +36,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>
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,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>
|
||||
|
||||
|
||||
|
||||
|
@ -35,6 +36,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>
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,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>
|
||||
|
||||
|
||||
|
||||
|
@ -35,6 +36,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>
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,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>
|
||||
|
||||
|
||||
|
||||
|
@ -35,6 +36,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>
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,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>
|
||||
|
||||
|
||||
|
||||
|
@ -35,6 +36,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>
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,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>
|
||||
|
||||
|
||||
|
||||
|
@ -35,6 +36,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>
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,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>
|
||||
|
||||
|
||||
|
||||
|
@ -35,6 +36,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>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue