Yes! You can do that. You've to just hop over to the wsgi.py setting part.
[image: Mailtrack] <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&> Sender notified by Mailtrack <https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&> 04/01/19, 11:20:50 On Fri, Jan 4, 2019 at 5:39 AM Mike Dewhirst <[email protected]> wrote: > I'm no expert and I suspect things are working as designed but I'm > getting multiple admin emails from a production site reporting attempts > to access wsgi.py > > So my question is: Can I change the name of wsgi.py so the hackers get > 401 errors and maybe go away? > > The emails have subject lines like ... > > [Django] ERROR (EXTERNAL IP): Invalid HTTP_HOST header: > '43.211.128.177'. You may need to add u'43.211.128.177' to ALLOWED_HOSTS. > > ALLOWED_HOSTS is tied down to exactly the website domain. > > Thanks > > Mike > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/9bfa0c95-68a9-170c-fb39-3888d376f98b%40dewhirst.com.au > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHMQ533t94rMEK0f%2BGJ2cDV8WUoQ%2B5nyAgQcfddOpvfkYmwQ9g%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.

