I'm using the following version of Apache ...
httpd -v
Server version: Apache/2.4.6 (CentOS)
Server built: Apr 24 2019 13:45:48
I have a lot of entries in my /var/log/httpd/access_log file that are for domains that are not my domain ...
79.143.191.42 - - [17/Dec/2019:10:36:30 -0500] "GET http://www.guenstiger.de/Produkt/Prada/Infusion_d_Homme_Deodorant_100_ml.html HTTP/1.1" 400 64146 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/536.26.17 (KHTML like Gecko) Version/6.0.2 Safari/536.26.17"
I'm not sure how these entries are ending up in my log file, since the domain does not resolve to my server, but is there are any way to funnel these requests into a separate log file?
Edit: Here is my VirtualHost configuration (done after suggestion from answer) ...
<VirtualHost *:80>
CustomLog /var/log/httpd/garbage_access_log common
</VirtualHost>
<VirtualHost *:80>
ServerName mydomein.com
Alias /static /var/www/html/myproject/static
<Directory /var/www/html/myproject/static>
Require all granted
</Directory>
# Next, add the following directory block
<Directory /var/www/html/myproject>
<Files wsgi.py>
Require all granted
</Files>
</Directory>
WSGIDaemonProcess myproject python-home=/var/www/html/venv python-path=/var/www/html
WSGIProcessGroup myproject
WSGIScriptAlias / /var/www/html/myproject_project/wsgi.py
</VirtualHost>
Edit: In response to the suggestion given, I tried this
<If "%{HTTP_HOST} == 'mydomein.com'">
CustomLog /var/log/httpd/access_log common
<Else>
CustomLog /var/log/httpd/other_access_log common
ErrorDocument 421 "%{HTTP_HOST} is not available here"
</If>
which resulted in the error ...
Expected </Else> but saw </If>
and so I tried this ...
<If "%{HTTP_HOST} == 'mydomein.com'">
CustomLog /var/log/httpd/access_log common # Error on this line
</If>
<Else>
CustomLog /var/log/httpd/other_access_log common
ErrorDocument 421 "%{HTTP_HOST} is not available here"
</Else>
but this resulted in the error
CustomLog not allowed here