Ever want to immediatly serve content from a specific directory over HTTP, but didn’t want to bother messing with
httpd.conf or other webserver configiurations?
If you’ve got Python installed, this is a snap. Execute python with the SimpleHTTPServer module, using port 8080 so
there isn’t a need to elevate privs to root.
python -m SimpleHTTPServer 8080 Serving HTTP on 0.0.0.0 port 8080 … or python3 -m http.server 8080
Sure enough, pointing a browser to the IP address :8080 of the box hits my home directory listing. Super easy, super
fast, super simple!
I use this to serve content to my PS3. The PS3 doesn’t support NFS or CIFS, so to download content to the hard drive,
the best method is by pulling it over HTTP with the embedded web brower. On my MacBook, I change into the directory
containing whatever media I want to transfer, fire up HTTP, and suck it down to the hard drive on the PS3. Nice!
source: http://prefetch.net/blog/index.php/2009/10/31/serve-out-content-over-http-from-your-cwd-immediatly/
Leave a Reply
You must be logged in to post a comment.