问题:使用ip访问不了django站点,只能用127.0.0.1访问
 
django搭建的站点,通过localhost能访问,但是通过ip不能访问
 
解决方法:启动服务时ip使用0.0.0.0
 
使用gunicorn启动
gunicorn -w4 -b0.0.0.0:8020 UITestManage.wsgi
 
使用runserver启动
 python3 manage.py runserver 0.0.0.0:8020
 

相关文章:

  • 2021-09-16
  • 2022-01-16
  • 2022-12-23
  • 2021-06-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
猜你喜欢
  • 2022-02-08
  • 2021-12-13
  • 2022-02-24
  • 2022-12-23
  • 2021-12-16
相关资源
相似解决方案