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 0.0.0.0 port 8000 ...
James-Laptop - - [24/Jun/2012 12:39:37] "GET / HTTP/1.1" 200 -

Browse to your ipaddress on port 8000
http://my_system_address:8000

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s