Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using Ubuntu Server as virtual machine using VMWare inside Windows 7 as host. I can access Windows 7 folders from Ubuntu machine through sharing settings. I'm developing a website on localhost in Ubuntu which i access at http://127.0.0.1:5000/ (using Ubuntu's browser) but when i put the same address into Windows 7's browser, it doesn't loads the website.

How can i access (localhost ) websites which are being accessed inside Ubuntu machine's browser.

What settings to look for? Please Suggest.

share|improve this question

On ubuntu server in terminal type ifconfigto see IP address of that server, you should get output like:

# ifconfig 
eth0      Link encap:Ethernet  HWaddr ... 
          inet addr:192.168.100.106  Bcast:192.168.100.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5720413 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6295478 errors:0 dropped:0 overruns:0 carrier:1
          collisions:0 txqueuelen:1000 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0

In this example IP is 192.168.100.106.
So in browser type http://192.168.100.106:5000/

share|improve this answer
    
Tried accessing the website into Host Windows 7's browser using the mehtod you told after obtaining ip address from virtual Ubuntu Machine. But still it dind't load. – UC456 Jul 8 '13 at 9:28
    
Do you have website stored in some subfolder like http://192.168.100.106:5000/test. Did you set Apache server on Ubuntu server to listen on 5000 port by yourself or some third party software? – mirkobrankovic Jul 8 '13 at 9:50
    
Its a flask python based website stored in /home/<username>/flasksite folder and its not running on apache... Flask has inbuilt server to serve the site. – UC456 Jul 9 '13 at 1:55

I had the same issue, and found an answer on Stack: Flask - configure dev server to be visible across the network. You just need to override default host value, when running flask app:

app.run(host='0.0.0.0', port=5000)   

Check Quick Start guide.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .