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/