Python SimpleHTTPServer: Cannot connect from any machine on the LAN

1

I'm trying to view a website I am building on my Mac on an iPad that is connected on the same LAN on the same Wireless AP.

I've got the right IP address, I can load up the page just fine on the same machine (http://localhost)

and this is how I started the server sudo python -m SimpleHTTPServer 80

What are the steps I can take to figure out why connections from other machines on my network don't work?

Steven Lu

Posted 2012-10-10T04:52:47.827

Reputation: 2 818

Have you figured out what the exact problem was ? I am facing the same problem at the moment and found this very old question – Kev1n91 – 2017-04-06T12:53:04.003

1The question is too old and not specific for me to remember what I was doing so I do not remember what the resolution was. But it sounds like if you have a third unix computer you can use traceroute etc. like the answer says. – Steven Lu – 2017-04-06T16:40:19.107

Answers

2

Check if your system and switch firewall is allowing port 80. Here is what you should do to figure it out from a remote machine in your network:

$ traceroute <IP_on_which_python_server_is_running>

Also try:

$ telnet <IP_on_which_python_server_is_running> 80

This will help you to figure out if the port is accessible or not.

Aditya Patawari

Posted 2012-10-10T04:52:47.827

Reputation: 253

Ah, yes, traceroute and telnet. good tools that I have used before but forgot about yesterday. – Steven Lu – 2012-10-10T22:42:52.113

Could you please upvote this if it helped you. :) – Aditya Patawari – 2012-10-11T05:59:08.820