I have created a web service using django, wsgi and nginx in ubuntu.(http://127.0.0.1:8000) . My network connection is NAT. I want to access to this web service from Linux in VMWare. How can I do this?
Asked
Active
Viewed 593 times
1
-
did you try using the external ip of the ubuntu? i.e. `http://external.ip.address:8000'? (you can get the address by running `ifconfig` – Yaron Mar 09 '17 at 14:31
-
@Yaron yes "ping: unknown host http://external.ip.address:8000" – Jasmine Mar 09 '17 at 14:37
-
If you want to use `ping`, you should run it without the `:8000` part, try running it using web-browser... – Yaron Mar 09 '17 at 14:41
-
I have access from vmware to ubuntu and from ubuntu to vmware. I want to give access to my localhost (http://127.0.0.1:8000) . I haven't browser in vmware's linux – Jasmine Mar 09 '17 at 14:48
-
1`localhost` is `local`, you are not suppose to use it outside of the machine (and yes, your VM is outside of the host `localhost` , why won't you use the external_ip of the host? – Yaron Mar 09 '17 at 14:51
-
I changed nginx listen section. Now it is ok. Thanks Yaron. – Jasmine Mar 09 '17 at 15:04
1 Answers
1
Don't use NAT
but use Bridge
in your VM Network Adapter. Also configure your web service and/or nginx to listen on the real IP of the VM and not only localhost
.

duenni
- 2,959
- 1
- 23
- 38