1. add nginx 404 block for spammers and bots based on their user agent. 2. add HTTP basic auth (NGINX and Apache) to protect your site or selfhosted apps from those same spammers, bots and freeloaders (build)

This commit is contained in:
kurets 2024-09-05 21:13:31 +03:00
parent 730355d046
commit 7b0595dfe6
Signed by: kurets
GPG key ID: EEB449C295BF5174
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@ Adapt the following for your use case and simply place it in every nginx.conf th
</div>
<small><em><p style="color: var(--muted_text);">作成日: <time datetime="2024-09-05T16:58:04&#43;03:00" style="color: var(--muted_text);">2024年9月5日 (木)</time>, 最終更新日: <time datetime="2024-09-05T17:22:43&#43;03:00" style="color: var(--muted_text);">2024年9月5日 (木)</time> </p></em></small>
<small><em><p style="color: var(--muted_text);">作成日: <time datetime="2024-09-05T16:58:04&#43;03:00" style="color: var(--muted_text);">2024年9月5日 (木)</time>, 最終更新日: <time datetime="2024-09-05T21:13:08&#43;03:00" style="color: var(--muted_text);">2024年9月5日 (木)</time> </p></em></small>
<div class="post-content"><p>My server has been getting bussyblasted by spam requests from bots and other subhumans and I figured out a way to block them with NGINX.</p>
<p>Adapt the following for your use case and simply place it in every nginx.conf that is <code>ln -s</code> linked to your <code>/etc/nginx/sites-enabled</code> (<em>it should be under the <code>listen 443</code> server block if you use certbot. Don&rsquo;t add it under <code>location</code> it should be on the same level as <code>listen [::]:443 ssl;</code></em>)</p>

View file

@ -6,7 +6,7 @@
<lastmod>2024-09-05T17:22:43+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-05T17:22:43+03:00</lastmod>
<lastmod>2024-09-05T21:13:08+03:00</lastmod>
</url><url>
<loc>https://vodoraslo.xyz/articles/blog/neater-footnotes-in-hugo-using-the-details-html-tag/</loc>
<lastmod>2024-08-31T17:06:20+03:00</lastmod>