Set up simple webservers

Here are two ways to test your webpages on simple servers. Open a terminal window in the folder you want to share on the LAN:

# python -m SimpleHTTPServer 8000

If you have PHP installed on the system, here’s another method:

# php -S localhost:8000

You can also run your php files, and read the error messages if there should be any errors in your code.

But beware … these simple servers are only meant for development. The methods are not secure at all. So use them wisely.

In both cases – can open your favorite browser in http://localhost:8000.

Published by Per Thykjaer Jensen

Senior Lecturer at the Multimedia Design and Communication Programme at Aarhus Business College. I teach code and UX. Linux evangelist and WordPress expert.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.