Request Method: |
GET |
Request URL: |
Http://202.201.38.70:8000/angular |
Django Version: |
1.11.3 |
Exception Type: |
Disallowedhost |
Exception Value: |
Invalid http_host Header: ' 202.201.38.70:8000 '. Need to add ' 202.201.38.70 ' to allowed_hosts. |
Exception Location: |
/usr/local/python3/lib/python3.6/site-packages/django-1.11.3-py3.6.egg/django/http/request.py in Get_host, line 113 |
Python executable: |
/usr/local/python3/bin/python3 |
Python Version: |
3.6.1 |
Python Path: |
['/var/www/html/application/mysite ', '/usr/local/python3/lib/python36.zip ', '/usr/local/python3/lib/python3.6 ', ' /usr/local/python3/lib/python3.6/lib-dynload ', '/usr/local/python3/lib/python3.6/site-packages ', '/usr/local/ Python3/lib/python3.6/site-packages/django-1.11.3-py3.6.egg ', '/usr/local/python3/lib/python3.6/site-packages/ Pytz-2017.2-py3.6.egg ', '/usr/local/python3/lib/python3.6/site-packages/pymysql-0.7.11-py3.6.egg ', '/usr/local/ Python3/lib/python3.6/site-packages/django_tokenapi-1.0-py3.6.egg ', '/usr/local/python3/lib/python3.6/ Site-packages/xlrd-1.0.0-py3.6.egg ', '/usr/local/python3/lib/python3.6/site-packages/python_ Dateutil-2.6.1-py3.6.egg ', '/usr/local/python3/lib/python3.6/site-packages/six-1.10.0-py3.6.egg '] |
Server Time: |
Tue, 2017 09:56:31 +0000 |
When you run the project, enter command #Python manage.py runserver 192.168.1.111:8000, enter HTTP///192.168.1.111:8000 in the native browser
Modify the setting.py file in the project we created
allowed_hosts = [' * '] # Here The requested host has been added *
Running the Django project appears invalid Http_host header: ' 192.168.1.111:8000 '. Need to add ' 192.168.1.111 ' to allowed_hosts