Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Django deployment

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Django-admin.py startproject HelloWorld

Cd HelloWorld

Python manage.py runserver 119.23.175.75:8000

Error report:

[root@iZwz9j0rhuuld23m4jpvjiZ HelloWorld] # python manage.py runserver 119.23.175.75:8000Performing system checks...System check identified no issues (0 silenced). You have 13 unapplied migration (s). Your project may not work properly until you apply the migrations for app (s): admin, auth, contenttypes, sessions.Run 'python manage.py migrate' to apply them.August 10, 2017-01:22:59Django version 1.10.7, using settings' HelloWorld.settings'Starting development server at http://119.23.175.75:8000/Quit the server with CONTROL-C.Invalid HTTP_HOST header:' 119.23.175.75 virtual 8000mm. You may need to add upright 119.23.175.75'to ALLOWED_ hosts. [10 / Aug/2017 01:23:15] "GET / HTTP/1.1" 400 60326Invalid HTTP_HOST header: '119.23.175.75 You may need to add 8000. You may need to add upright 119.23.175.75'to ALLOWED_ hosts. [10 / Aug/2017 01:23:16] "GET / favicon.ico HTTP/1.1" 400 60408 ^ C [root@iZwz9j0rhuuld23m4jpvjiZ HelloWorld] # python manage.py migrate

Solution:

Python manage.py migrate

Another error was reported:

[root@iZwz9j0rhuuld23m4jpvjiZ HelloWorld] # python manage.py runserver 119.23.175.75:8000Performing system checks...System check identified no issues (0 silenced). August 10, 2017-01:24:13Django version 1.10.7, using settings' HelloWorld.settings'Starting development server at http://119.23.175.75:8000/Quit the server with CONTROL-C.Invalid HTTP_HOST header: '119.23.175.75 August 8000. You may need to add upright 119.23.175.75'to ALLOWED_ hosts. [10 / Aug/2017 01:24:29] "GET / HTTP/1.1" 400 60311Invalid HTTP_HOST header: '119.23.175.75 You may need to add 8000. You may need to add upright 119.23.175.75'to ALLOWED_ hosts. [10 / Aug/2017 01:24:29] "GET / favicon.ico HTTP/1.1" 400 60393Invalid HTTP_HOST header: '119.23.175.75 You may need to add 8000. You may need to add upright 119.23.175.75'to ALLOWED_ hosts. [10 / Aug/2017 01:24:32] "GET / HTTP/1.1" 400 60446Invalid HTTP_HOST header: '119.23.175.75 You may need to add 8000. You may need to add upright 119.23.175.75'to ALLOWED_HOSTS.

Solution:

Settings.py ALLOWED_HOSTS = [] is modified to: ALLOWED_HOSTS = ['*']

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report