Sep 01 2015 0

Simple web server

Sometimes you just need a simple web server to quickly test a piece of HTML or CSS before uploading it to its final location. Both Python and PHP provide a built-in web server.

Move to the directory containing the files you want to be served by the web server and start the web server process by using one of the following commands

Using Python

python -m SimpleHTTPServer 8000

Using PHP version 5.4.0 and higher

php -S localhost:8000

for PHP you can also specify the document root removing the requirement to move to the directory first

php -S localhost:8000 -t /home/fmeus/www/

Previous post
Raspberry Pi Sense HAT The Sense HAT is an add-on board for Raspberry Pi, made especially for the Astro Pi mission - it’s going to the International Space Station in
Next post
High CPU usage for mds process Lately the Mac Mini was getting somewhat slow again. Looking at the Activity Monitor showed the process to take up 90-100% CPU for one of its
This blog is powered by Blot