Last Updated: February 25, 2016
·
704
· fedemp

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

1 Response
Add your response

wow, this is useful! thanks for sharing!

over 1 year ago ·