Instructables

Quicky web server for linux.

Picture of Quicky web server for linux.
Screenshot-Directory listing for - - Mozilla Firefox-1.png
Here are several examples of quick ways to set up a web server. I like to use the the python web server for quickly downloading files between computer systems be it they are workstations, laptops, touchpads/tablets. or etc. The computers involved must be connected to a network via tcpip or it will not work. Unconnected computers will not work. Note: you could use a crossover cable between two machines via tcpip protocol.  Warning: this method is not secure!!

Note: Using nweb or the python web server are good for tow resource machines.

 
Remove these adsRemove these ads by Signing Up

Step 1: Set up.

Picture of Set up.

Most all linux systems come with python or if not you can easily download and install it. Actually you might be able to do this on an mswindows machine, but I have not tried it.

1.  Go to command line and cd to the directory you want to serve.
   (in my case it would be cd arranged.

2. Find out the IP address of the machine you are on with ifconfig.

3.  While in that directory type in without quotes "python -m SimpleHTTPServer".
You should see something like this
python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
localhost - - [21/Oct/2010 11:11:43] "GET / HTTP/1.1" 200 -
localhost - - [21/Oct/2010 11:11:43] code 404, message File not found
localhost - - [21/Oct/2010 11:11:43] "GET /favicon.ico HTTP/1.1" 404 -
localhost - - [21/Oct/2010 11:11:46] code 404, message File not found
localhost - - [21/Oct/2010 11:11:46] "GET /favicon.ico HTTP/1.1" 404 -
^CTraceback (most recent call last):
  File "/usr/lib/python2.6/runpy.py", line 122, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.6/runpy.py", line 34, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.6/SimpleHTTPServer.py", line 218, in
    test()
  File "/usr/lib/python2.6/SimpleHTTPServer.py", line 214, in test
    BaseHTTPServer.test(HandlerClass, ServerClass)
  File "/usr/lib/python2.6/BaseHTTPServer.py", line 588, in test
    httpd.serve_forever()
  File "/usr/lib/python2.6/SocketServer.py", line 224, in serve_forever
    r, w, e = select.select([self], [], [], poll_interval)

That is it for this machine.

OgreArtist3 years ago
Thanks. It was clear and to the point.
Computothought (author)  OgreArtist3 years ago
Thanx for your kind comment.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!