Server Fault is a question and answer site for system and network administrators. 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

Every once in a while when I'm debugging some web app, it would be useful for me to be able to serve a folder via a lightweight HTTP server. Something along the lines of

cd folder
httpserve -p 5000

in order to serve that folder over port 5000. Is there any tool to allow me to do this?


share|improve this question
Which operating system? – Mark Henderson Aug 17 '10 at 21:12
I'm on a Mac, the Python thing from ax25 seems to work great for me. – wxs Aug 17 '10 at 21:25
up vote 4 down vote accepted

python -m SimpleHTTPServer 5000

Or for cgi serving:

python -m CGIHTTPServer 5000

and browse to : http://localhost:5000/

share|improve this answer
Exactly what I was looking for, thanks! – wxs Aug 17 '10 at 21:25
You are welcome. Glad to have one to answer! – ax25 Aug 20 '10 at 20:13

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.