Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I can connect to a local python webserver via 'http://localhost:8000/' and '127.0.0.1:8000/' However, I couldn't do something like 'http://192.168.1.2:8000/' The browser just prompt "could not connect to 192.168.1.2:8000/"

Any idea how to fix this? From another computer on the same network also can't connect to http://192.168.1.2:8000/

The machines are Windows 7 Home premium.

share|improve this question

1 Answer 1

I haven't tried running a python webserver on Windows, but generally a webserver will be set to listen to a specific IP address and port. By default it's probably localhost (since that never changes).

Check the network configuration in your webserver software to see what it binds to. You might have a directive like:

HTTPServer('localhost',80)

which would listen on localhost/127.0.0.1 only. I believe leaving the '' contents blank would have it listen on any available interface. You could also specify 192.168.1.2 in the quotes. Either way, you may have to restart and/or change the IP address if you get a new dhcp-assigned address.

BTW, your second paragraph says "also connect connect to"... do you mean "also cannot connect to"?

share|improve this answer
1  
A binding issue sounds like the problem to me as well. –  joeqwerty Jun 7 '11 at 23:27

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.