« Amazon hit by 'shopping cart' patents lawsuit | Main | On the subject of Hamas »

March 18, 2004



This is great! Also see my story about how this is better than Samba, Apache and Firefox together ;-).

Gary Robinson

Thanks for writing, I enjoyed your story!

Arlo Emerson

That made my day. So simple!


If it's too long, try

python -c 'from SimpleHTTPServer import test;test()'



Even more compact:

python -m SimpleHTTPServer


(Via masklinn's comment of Ed Taekema's blog post.)


in python3:

python3 -m http.server 8000

Gary Robinson

Thanks duffy, I'll update the post accordingly!

Gopal Shah

Great tip. I have a Linux machine with customized OS and there is no repository to apt-get install from. So it would have been a pain to install Apache.
Saved me days of work.

multiple ip hosting services

That's pretty simple but very useful. Thanks for sharing this stuff.

Paolo Dina

This is a great tip! To make it even shorter I added this alias to ~/.bashrc

alias http="python -m SimpleHTTPServer"

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment

Your Information

(Name and email address are required. Email address will not be displayed with the comment.)