Boa: An Embedded Web Server

January 25 , 2022
What Is Boa?
Embedded Web Server transplantation because embedded device resources are generally limited and do not need to be able to process requests from many users at the same time, it does not use the most common Linux servers such as Apache, some Web servers specially designed for embedded devices are required. These web servers are suitable for embedded applications in the storage space and the memory space occupied by the operation.

Typical embedded web servers include BOA and thttpd. The main difference between them and high-performance Web servers such as Apache is that they are generally single-process servers, only after a user request is completed can the request of another user be responded without concurrent response, but this is sufficient for embedded devices.

Boa is a very small Web server with only about 60 kb of executable code. It is a single-task web server that can only complete user requests in sequence, rather than fork new processes to process concurrent connection requests. However, Boa supports CGI and can execute a process for the CGI program fork. Boa's goal is speed and security. In performance tests published on its site, Boa's performance is better than that of Apache servers.




Tonmind IP Audio Products including IP Speaker, SIP Paging Adapter, SIP PCB Board all apply Boa that support configuration via web login. With this feature, users configure the IP Audio Products in a very easy way, usually can be completed in a few seconds.




Apart from web setting, users can also install Tonmind SIP Speaker tool software called IPTool to configure . Both two configuration ways are convenient and workable.


Setting up Boa
Because 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.
•Run the configure script (./configure) and then type make to build the executable. Recently, I built Boa on my laptop. The make step took less than 11 seconds.
•Edit the configuration file, boa.conf, to set up your local configuration.
•Make sure the appropriate directories (such as the log directory) exist and have the proper permissions.
•Start Boa from the command line. Use the -c command-line option to specify the server root if you didn't set SERVER_ROOT to the desired directory location in define.h.

Once you have the basics running, check out the config file (boa.conf) for additional configuration options. Here is a quick summary of the most important. The config file is well commented so if you don't see what you need here, read the comments for additional options.
•Port allows you to specify the port to listen on. The default is 80, which is the standard HTTP port. For any port less than 1024 you must start Boa as root.
•By default, Boa binds to all IP addresses. This means that any request that comes into the system on the specified port is served by Boa. If this isn't acceptable, you can use either the VirtualHost directive to point different requests to different files, or you can run individual copies of Boa for each IP address.
•User and Group allow you to specify the name of the user and group Boa runs as. Normally you would start Boa as root, and then once it configures itself, it changes to run as the specified user and group.
•ErrorLog and AccessLog allow you to specify where the log files are located. If you comment out the AccessLog line, no access log will be created.
•DocumentRoot specifies the root directory of the HTML files.
•UserDir specifies a directory name that can be appended onto a user's home directory to locate web pages accessed by using ~user in the URL.
•DirectoryIndex specifies the name of the index file. This is traditionally index.html.
•DirectoryMaker is the path to the program used to create index listings. Comment this out if you don't want to allow directory listings.
•Alias is used to specify a redirect, allowing a specified URL to access a page in a different location. Multiple Alias directives are allowed.

•ScriptAlias is used to specify where CGI scripts can reside. Essentially, this allows a shorthand in the URL for locating the scripts.


In conclusion, Boa can support CGI and can fork out a process for CGI programs to execute high speed and safety task. With application of Boa and CGI, Tonmind IP Speaker System has been easy for configuration via web login way.



Leave A Message
Leave A Message
If you are interested in our products and want to know more details,please leave a message here,we will reply you as soon as we can.

Home

Products

skype

whatsapp