A Simple HTTP Server

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
labbe5
Posts: 2159
Joined: Wed 13 Nov 2013, 14:26
Location: Canada

A Simple HTTP Server

#1 Post by labbe5 »

http://pclosmag.com/html/Issues/201607/page09.html

The PC LinuxOS Magazine has an article about how to create a simple HTTP server.

This is a summary :

To set up a temporary, very simple, HTTP server for any directory in your /home directory, follow these instructions.

Open a terminal and cd to the directory of choice.

Issue the following command:

python -m SimpleHTTPServer

You can then access the contents of that directory using a browser pointed at the IP address of the PC at port 8000.

192.168.3.12:8000 as an example, from any PC on the LAN.

You can also access the directory from the same machine (not very useful) using

http://127.0.0.1:8000

or

http://localhost:8000

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#2 Post by rcrsn51 »

There is a GUI front-end for SimpleHTTPServer here.

User avatar
Uten
Posts: 129
Joined: Tue 29 Jan 2008, 11:00

#3 Post by Uten »

We can also use (at least on FatDog64-702 ).

Code: Select all

busybox httpd -f -p 8080 -h /root/spot 
If memory serves me right not all flavors of puppy / busybox has the httpd applet compiled in.

User avatar
rcrsn51
Posts: 13096
Joined: Tue 05 Sep 2006, 13:50
Location: Stratford, Ontario

#4 Post by rcrsn51 »

Uten wrote:If memory serves me right not all flavors of puppy / busybox has the httpd applet compiled in.
You need to provide all the config stuff needed by an HTTP server. The Python app works OOTB.

Post Reply