Nweb revisited.


Nweb (http://www.ibm.com/developerworks/systems/library/es-nweb/) is a neat little web server (among others) that does well on an embedded machine where static files are important to use, You can also use it in concert with a machine that already has a web server running, but beware it is not secure,  Generally it is for nix based systems, but might be able to be compiled on other systems.


The picture is a screen dump from a system accessing a Pogoplug running nweb on arch linux. Of course you need some content, but the source file for nweb comes with a bit of web content for testing. For testing you can use the source directory you will create. Remember you will have to have the development environment  already installed. Note: Good security recommends not having the web development on the system doing the serving.

$ mkdir nweb
$ cd  nweb
$ wget  ftp://ftp.boulder.ibm.com/systems/power/community/aix/nweb/nweb.zip
$ unzip nweb
$ ls

client.c     nweb23_aix6_1_7          nweb23_RHEL63_64       nweb.zip
favicon.ico  nweb23.c                 nweb23_SLES_11_64      nweb.zip.1
index.html   nweb23_Fedora_17_64      nweb23_ubuntu_12_4_32  README.txt
nigel.jpg    nweb23_openSUSU_12_1_64  nweb23_ubuntu_12_4_64
nweb23_raspberry_pi      nweb.log

Then you need to compile the code.The notes say to use cc but you should really use gcc and the version s/b 23 not 22.


$  gcc nweb23.c -o nweb

Then you will want to test it out with an unused port number and specify the directory. We will use the current directory,

$ ./nweb 9000 .

and then using the url http://yourwebserver:9000 in the web browser, you should get:


You can always terminate the server with:

$ pkill nweb

Nweb is a simple way to server up documentation as needed.

Comments

Popular posts from this blog

Guiless?

MSOffice vs Libreoffice

Raspberry pi zero.