Please take a look on the ALLOWED_HOSTS documentation 
https://docs.djangoproject.com/en/4.0/ref/settings/#allowed-hosts.

*A list of strings representing the host/domain names that this Django site 
can serve. This is a security measure to prevent HTTP Host header attacks 
<https://docs.djangoproject.com/en/4.0/topics/security/#host-headers-virtual-hosting>,
 
which are possible even under many seemingly-safe web server 
configurations.*

Assuming 3.208.32.109 is your server IP you should add it to ALLOWED_HOSTS.

piątek, 24 czerwca 2022 o 19:00:23 UTC+2 cseb...@gmail.com napisał(a):

> I constantly get the errors below in my Django server logs.  To try to 
> remove this,
> I added this to my  Nginx server's nginx.conf file but it didn't work....
>
>         server {
>
>                 listen 80 default_server;
>
>                 return 444;
>
>         }
>
> What else can I do to remove these errors below this line???
>
> Invalid HTTP_HOST header: '3.208.32.109'. You may need to add 
> '3.208.32.109' to ALLOWED_HOSTS.
>
> Invalid HTTP_HOST header: '3.208.32.109'. You may need to add 
> '3.208.32.109' to ALLOWED_HOSTS.
>
> Invalid HTTP_HOST header: '3.208.32.109'. You may need to add 
> '3.208.32.109' to ALLOWED_HOSTS.
>
> Invalid HTTP_HOST header: '3.208.32.109'. You may need to add 
> '3.208.32.109' to ALLOWED_HOSTS.
>
> Invalid HTTP_HOST header: '3.208.32.109'. You may need to add 
> '3.208.32.109' to ALLOWED_HOSTS.
>
> Invalid HTTP_HOST header: '3.208.32.109'. You may need to add 
> '3.208.32.109' to ALLOWED_HOSTS.
>
> Invalid HTTP_HOST header: '3.208.32.109:443'. You may need to add 
> '3.208.32.109' to ALLOWED_HOSTS.
>
> Invalid HTTP_HOST header: '3.208.32.109'. You may need to add 
> '3.208.32.109' to ALLOWED_HOSTS.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/861efce3-068d-446e-a635-03c0c7e49547n%40googlegroups.com.

Reply via email to