Boa Webserver

1.Go to official site http://www.boa.org/ download source code.

2.compile: referce the official site document http://www.boa.org/documentation/boa-2.html

(1)cd src, because configure flile is in src directory.

(2) ./configure

(3)Modify source code: "foo##->tm_gmtoff" to "foo->tm_gmtoff". or not "make" will be error.

If will run in mini2440, need modify Makefile:

CC = arm-linux-gcc 
CPP = arm-linux-gcc -E

 

(4)make.

3.Install

(1) Copy "boa" and "boa_indexer" to /bin/.

(2) Copy "boa.conf" to /etc/boa. NOTE: boa.conf is in ../src

4.Config the server.

#Group nogroup    -->改为 Group 0(可选)
#ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/    -->改为    ScriptAlias /cgi-bin/ /var/www/cgi-bin/ (可选)

因为系统默认是没有nogroup组的(0表示root组,可以使用id命令查看,见下)

5.Copy a .html file to /var/www/. Such as http://www.boa.org/

6.Run.

Error 1: log.c:73 unable to dup2 the error log:bad file descriptor

    解决方法:

    方法1> 确定日志目录对与所有用户都具有可读/写的权限

    方法2> 修改src/log.c (现采用此法)

注释掉

if (dup2(error_log, STDERR_FILENO) == -1) {

DIE("unable to dup2 the error log");

}

Error 2: Cannot open /var/log/boa/access_log for logging: logfile open: No such file or directory

Solution: just mkdir /var/log/boa

Run suceed as below:

7.Test

use "http://192.168.xxx.xxx/xxx.html" to visit. As below:

(end)

posted on 2018-12-28 11:30  lizhuohui  阅读(167)  评论(0编辑  收藏  举报

导航