简体   繁体   中英

Access Ubuntu django server in VM from Windows

I have a Django server up and running in my Ubuntu VM using

python manage.py runserver 0.0.0.0:8000

I can access this in the VM browser. When I try to access using Windows browser the connection is never established. How do I make this happen?

In your Ubuntu VM settings go to Network -> Advanced Dropdown -> Port Forwarding button and there add rule with Host Port 8000 and Guest Port 8000

EDIT: 在此处输入图片说明

在此处输入图片说明

When you set up this, then run server with this command

python manage.py runserver 0:8000

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM