博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
web服务器boa的移植
阅读量:4356 次
发布时间:2019-06-07

本文共 1779 字,大约阅读时间需要 5 分钟。

1.下载官方网站

我下载的是0.94.13版本

2.解压

tar -zxvf boa-0.94.13.tar.gz

3.进入src目录

./configure

配置一下生成makefile文件

4.修改makefile

CC = gcc 

CPP = gcc -E

改为

CC = arm-none-linux-gnueabi-gcc

CPP = arm-none-linux-gnueabi-gcc -E

5.修改 src/compat.h

 #define TIMEZONE_OFFSET(foo) foo##->tm_gmtoff
 ->#define TIMEZONE_OFFSET(foo) foo->tm_gmtoff
 修改错误util.c:100:1: error: pasting "t" and "->" does not give a valid preprocessing token

6.修改src/boa.c

   DIE("icky Linux kernel bug!"); -> ;//DIE("icky Linux kernel bug!");
 boa.c:226 - icky Linux kernel bug!: Success(这个错误要查看后面提到error_log文件才能发现)

7.make

编译生成boa文件

8.将boa文件拷贝到目标文件系统的/bin目录下

9.进入目标文件系统,创建/etc/boa目录

10.拷贝压缩包解压目录下的boa.conf 文件到/etc/boa目录下

11.修改boa.conf文件

 User nobody -> User root
 Group nogroup -> Group 0
 MimeTypes /etc/mime.types -> MimeTypes /etc/boa/mime.types
 ErrorLog /var/log/boa/error_log -> ErrorLog /etc/boa/error_log
 AccessLog /var/log/boa/access_log -> AccessLog /etc/boa/access_log
 DocumentRoot /var/www -> DocumentRoot /etc/boa/html
 #ServerName -> ServerName
  错误:gethostbyname:: Resource temporarily unavailable
 ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ ->ScriptAlias /cgi-bin/ /etc/boa/cgi-bin/

12.目标文件系统中创建/etc/boa/html目录 修改属性777

13.拷贝index.html主页到/etc/boa/html目录下 chmod a-x *.html修改属性

 错误:403 Forbidden The requested URL '/' resolves to a file which is marked executable but is not a CGI file; retrieving it is forbidden.

14.修改启动脚本 添加boa &

15.目标文件系统/etc/boa目录下创建access_log error_log文件 属性777

16.目标文件系统/etc/boa目录下创建cgi-bin目录

17.复制ubuntu /etc/mime.type文件到目标板/etc/boa下

 错误:Could not open mime.types file, "/etc/mime.types", for reading

18.Port 80 -> Port 8080 那么测试地址xxx.xxx.xxx.xxx:8080

 错误:unable to bind: Address already in use(这个错误要查看error_log文件才能发现)

如果不存在错误则port 80可以,那么测试地址为ip地址xxx.xxx.xxx.xxx

 

转载于:https://www.cnblogs.com/snake-hand/p/3206247.html

你可能感兴趣的文章
python_SMTP and POP3
查看>>
lambda匿名函数
查看>>
js常用方法
查看>>
建造者模式
查看>>
Spring入门教程:通过MyEclipse开发第一个Spring项目
查看>>
【转】你可能不知道的Shell
查看>>
廖雪峰Java1-2程序基础-1基本结构
查看>>
golang下的grpc
查看>>
1. 自动化运维系列之Cobbler自动装机
查看>>
ASP.NET MVC Model绑定(二)
查看>>
一步一步写算法(之hash表)
查看>>
漫谈并发编程(一) - 并发简单介绍
查看>>
JDBC连接MySQL数据库及演示样例
查看>>
System.currentTimeMillis();
查看>>
javascript中使用Map
查看>>
C# DataTable的詳細使用方法
查看>>
【转】Android的线程和线程池(AsyncTask)
查看>>
centos7 安装php7+mysql5.7+nginx+redis
查看>>
Ubuntu 14.04中文输入法的安装
查看>>
【分享】管理的最高境界是简单
查看>>