Serving static pages, quick and dirty
So you are running Ubuntu (or some other Linux distro) and you need to serve some static files but you don't want to install apache or any other web server. Then just run:
$ sudo python -m SimpleHTTPServer 8000
Or if you are into PHP, you can use
php -S localhost:8000
This last one documentation at http://www.php.net/manual/en/features.commandline.webserver.php
Written by Federico Panico
Related protips
1 Response
wow, this is useful! thanks for sharing!
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Python
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#