Cannot access django app through ip address while

2019-03-09 15:22发布

I have a django app on my local computer. I can access the application from a browser by using the url: http://localhost:8000/myapp/

But I cannot access the application by using the ip of the host computer: http://193.140.209.49:8000/myapp/ I get a 404 error.

What should I do? Any suggestions?

1条回答
Lonely孤独者°
2楼-- · 2019-03-09 16:22

I assume you're using the development server. If so, then you need to specifically bind to your external IP for the server to be available there. Try this command:

./manage.py runserver 193.140.209.49:8000
查看更多
登录 后发表回答