As a newbie, I find the Apache documentation a bit confusing, too much specification and too little recipes / practical examples to achieve a certain goal.
Forum posts are usually referring to older versions of Apache and refers to files that do no longer exist, such as httpd.conf or are on a syntax that no longer seems to be used.
Therefore I would like to ask for some help to get started with access control, despite this question earlier been raised.
My setup: Apache 2.4.29, Ubuntu 18.04, Django 2.1.7
Problem: Some bots in China do Host Header attacks against my IP address and today my Django deals with security. As well as, I get automated requests from search and survey companies flagged as errors.
Solution: I would like to deal with/stop those requests already at Apache level so they never reach Django.
Attempted solution: Some forum posts I have been reading suggest I need to define [SERVER] some other suggest a Require or Authorization Containers but cannot find a complete comprehensive answer to test.
In Apache documentation: e.g. in this section access control which file am I supposed to change, how does the whole file looks like, how does a fully working example looks like?
Ideally, the answers I am looking for is more of a recipe:
Change this file (e.g. etc/apache/apache2.conf or etc/apache/conf-available/security.conf)
Add the following section (below, above, etc)
Test it by...
I hope someone can help me to get started, many thanks