step1# 设置settings.py ALLOWED_HOSTS = ['*'] step2# 启动时 使用 python manage.py runserver 0.0.0.0:80启动服务 0.0.0.0表示所有ip都可以访问