index.html内容
"-//W3C//DTD XHTML 1.0 Transitional//EN" >
"http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
一口Linux
<body >
"center">
"900" border="0">
index.html内容
"-//W3C//DTD XHTML 1.0 Transitional//EN" >
"http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
一口Linux
<body >
"center">
"900" border="0">
"center">
"900" height="467" border="0" background="./image/yikou.png">
"126" height="948">
"351">
"101">
关于html语法,后面一口君会写几篇入门的教程。
运行boa
root@ubuntu:/home/peng/boa/boa-0.94.13/src# ./boa
root@ubuntu:/home/peng/boa/boa-0.94.13/src# [29/Jan/2022:15:42:26 +0000] boa: server version Boa/0.94.13
[29/Jan/2022:15:42:26 +0000] boa: server built Jan 29 2022 at 07:42:23.
[29/Jan/2022:15:42:26 +0000] boa: starting server pid=5761, port 80
打开浏览器
输入地址:
http://192.168.174.128/
只要能ping通boa所在主机的ip地址的浏览器都可以访问。
四、错误汇总
1.必需要在板子的/etc下建一个boa目录(错误代码忘了)
2.”can't open boa.conf for reading“解决:不只要在你本身放置boa的目录下放入boa.conf配置文件,并且要在板子的/etc/boa下也要放入boa.conf文件,这样系统在运行boa的时候才能够读取到boa.conf文件。
3.“unable to dup2 the error log bad file descriptor”解决:在boa源码里,即src文件夹下把log.c中的第73行的if语句注释掉。
4."unable to dup2 the error log:Bad file descriptor"解决:在boa.conf里,把“#AccessLog /var/log/boa/access_log”注释掉(即去掉#号)。
5.“[01/Jan/2031:00:12:25 +0000] boa.c:226 - icky Linux kernel bug!: No such file or directory”解决:在boa源码里,即src文件夹下把boa.c中的第226行的if语句注释掉。
6."gethostbyname:: Resource temporarily unavailable"解决:把“#ServerName ”的“#”号去掉。
7."./boa: 1: syntax error: "(" unexpected"解决:没有修改Makefile,是用gcc编译的,应该改为是arm-linux-gcc编译。
8.若是页面上是:“502 Bad Gateway The CGI was not CGI/1.1 compliant.“解决:给你要执行的cgi可执行程序赋个权限。chmod 777 filename
9.在
中,cgi可执行程序的路径就直接写“cgi-bin/test2.cgi”就能够了,不要写板子上的绝对路径,这样就重复了,由于cgi执行时会自动去boa.conf的指定的路径里找。
10.出现警告:“control reaches end of non-void function”,是由于某个函数没有return,而函数定义时是非void型的。因此须要有个返回值。好比int cgiMain()这个函数就必定要有个返回值的,不然会报这个错误。