Python – Simple HTTP Server

Let’s say i want to serve the contents of /home/james through http temporarily

I don’t want to setup apache because it’s temporary.
So instead i can do this:

$ cd /home/james
$ python -m SimpleHTTPServer

Serving HTTP on port 8000 ...
James-Laptop - - [24/Jun/2012 12:39:37] "GET / HTTP/1.1" 200 -

Browse to your ipaddress on port 8000


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s