리눅스 파이썬 장고 오류
netstat -anp | grep python 명령후
로컬호스트는 잘 되지만
다른컴퓨터 웹브라우저 접속시 아래와 같은 것이나오내요....
DisallowedHost at /
Invalid HTTP_HOST header: '220.94.113.174:8000'. You may need to add u'220.94.113.174' to ALLOWED_HOSTS.
Request Method: GET
Request URL: http://220.94.113.174:8000/
Django Version: 1.10.5
Exception Type: DisallowedHost
Exception Value:
Invalid HTTP_HOST header: '220.94.113.174:8000'. You may need to add u'220.94.113.174' to ALLOWED_HOSTS.
Exception Location: /usr/lib64/python2.7/site-packages/django/http/request.py in get_host, line 113
Python Executable: /usr/bin/python
Python Version: 2.7.5
Python Path:
['/opt/webapp/mysite',
'/usr/lib64/python27.zip',
'/usr/lib64/python2.7',
'/usr/lib64/python2.7/plat-linux2',
'/usr/lib64/python2.7/lib-tk',
'/usr/lib64/python2.7/lib-old',
'/usr/lib64/python2.7/lib-dynload',
'/usr/lib64/python2.7/site-packages',
'/usr/lib64/python2.7/site-packages/gtk-2.0',
'/usr/lib/python2.7/site-packages']
Server time: Sun, 22 Jan 2017 06:33:32 +0000
Traceback Switch back to interactive view
Environment:
Request Method: GET
Request URL: http://220.94.113.174:8000/
Django Version: 1.10.5
Python Version: 2.7.5
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "/usr/lib64/python2.7/site-packages/django/core/handlers/exception.py" in inner
39. response = get_response(request)
File "/usr/lib64/python2.7/site-packages/django/utils/deprecation.py" in __call__
134. response = self.process_request(request)
File "/usr/lib64/python2.7/site-packages/django/middleware/common.py" in process_request
57. host = request.get_host()
File "/usr/lib64/python2.7/site-packages/django/http/request.py" in get_host
113. raise DisallowedHost(msg)
Exception Type: DisallowedHost at /
Exception Value: Invalid HTTP_HOST header: '220.94.113.174:8000'. You may need to add u'220.94.113.174' to ALLOWED_HOSTS.
경고 같기도 한대 뜻을 모르겠내요
댓글 달기