Boa is a tiny web server that also offers extremely high performance. It is specifically designed to run on UNIX-like systems, which includes Linux, as well as the *BSD systems. To get all the legal stuff out of the way, Boa is available for free and is covered by the GNU Public License (GPL). The source code for Boa, as well as documentation, can be found at http://www.boa.org/.
The following point taken from the Boa web site :
“ Boa currently seems to be the favorite web server in the embedded crowd, and embedded Linux, despite all the marketing hype, really is a big deal. Supposedly, an older version of Boa, v0.92q, runs in 32K address space on m68k, like used in uClinux. ”
Setting up Boa
ReplyDeleteBecause Boa is so compact, it is also very easy to install and configure. The details are on the Boa web site, but if you are familiar with installing typical tarballs, Boa will be no surprise. The basic steps are:
Download the software.
Unpack using tar xvzf.
Optionally edit the defines.h file in the src directory to change the default SERVER_ROOT.
This isn't mandatory; you can also specify the server root on the command line when you start Boa.
./configure
make
make install
Edit the configuration file, boa.conf, to set up your local configuration.
Default listening port is 80, can be changed in boa.conf
start its services
service boa start/stop/restart
OR
yum install boa
start its services
service boa start/stop/restart
Simple script
ReplyDeletesave it as index.cgi, in folder cgi-bin
#!/bin/php
echo "Test page"
echo "vikas"
Two configurations of boa.conf
DocumentRoot specifies the root directory of the HTML files.
DirectoryIndex specifies the name of the index file. This is traditionally index.html.
Now after starting the boa web service, type the localhost in the browser.