Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 usually write code, not administer servers, so bear with me here!

I'm running a python script to act as a webserver and I also have Apache installed on the same machine.

When I run the python script, I get the success message:

Running on

However, when browse to the IP address of my server on my local network ( I get the Apache page. When I browse to I get 'Oops! Google Chrome could not connect to'.

How do I have the python server work on the local network instead of Apache?

share|improve this question

It's running (listening) on and not on

Fix the script to listen on the desired address, and it should work on

If you want it to run on port 80, change the script to listen on that port, turn off Apache, and restart the script.

share|improve this answer
Thanks, this worked. I am using Flask which I'm not familiar with but I used'') to make it listen on the local network, thanks! – Todd Davies Jan 3 '13 at 16:17

Connect using

You need to include the port in the URL, if you don't, it defaults to 80.

share|improve this answer
Sorry, I forgot to mention, this doesn't work either... – Todd Davies Jan 3 '13 at 16:12

Your python script is running it's own web server that is bound to your local machine on port 5000. To access your python application, you need to access it at

If you want to replace apache altogether, you will basically need to stop the apache web server and bind your python script on port 80. Depending on your operating system, you may or may not need elevated privileges to bind on port 80.

If you are still unable to access the python app from, you need to specifically bind the application to 

so it knows to listen on all interfaces, not just the loopback interface.

share|improve this answer

Your Answer


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.