1.settings.py里面配置 ALLOWED_HOSTS = ['*'] 2.启动命令变成: runserver 0:8000 或者 runserver 0.0.0.0:8000 参考http://blog.sina.com.cn/s/blog_9c5364110101fyk7.html