Home » Home » How To Run Simple Python Web server?

Most of us think Web Server usually refers to a heavy loaded hardware and software, which  intent to run hardcore programs and applications to make the network or internet alive. Fortunately that’s not true, the primary function of web server is to deliver web page to your browser, most frequently it will be in HTML document.

Web Server are not always used for serving World Wide Web. They can also be found embedded in devices such as routers, switches, printers, webcam’s to server the local network. This may be used as a part of a system for monitoring and/or administering the devices.

How To Access Simple HTTP Web Server in Ubuntu ?

Ubuntu has a per installed python package which extremely easy to activate Web Server at any instant of time under any directory.

Execute the following command in Terminal under any directory, from that point of time the directory will be allowed to access across the network.

$ python -m SimpleHTTPServer <any portnumber>

Example:

$ python -m SimpleHTTPServer 8080

Take a close look at the following snapshot, to know how it works.

webserver

Hope the article sounds informative, feel free to leave your comments and do share.

Leave a Reply

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

CAPTCHA Image

*