Invalid http_host header

前端 未结 3 674
Happy的楠姐
Happy的楠姐 2020-12-13 16:31

I am trying to develop a website using Django framework and launched using DigitalOcean.com and deployed the necessary files into django-project.

I had to include st

相关标签:
3条回答
  • 2020-12-13 17:11

    In your project settings.py file,set ALLOWED_HOSTS like this :

    ALLOWED_HOSTS = ['62.63.141.41', 'namjoosadr.com']
    

    and then restart your apache. in ubuntu:

    /etc/init.d/apache2 restart
    
    0 讨论(0)
  • 2020-12-13 17:13

    settings.py

    ALLOWED_HOSTS = ['*']
    
    0 讨论(0)
  • 2020-12-13 17:22

    The error log is straightforward. As it suggested,You need to add 198.211.99.20 to your ALLOWED_HOSTS setting.

    In your project settings.py file,set ALLOWED_HOSTS like this :

    ALLOWED_HOSTS = ['198.211.99.20', 'localhost', '127.0.0.1']
    

    For further reading read from here.

    0 讨论(0)
提交回复
热议问题