boa移植记录
写在前面 : boa 相关目录 : 1. boa.conf 的存放目录 : 默认 boa.conf 是在 /etc/boa.conf 目录的, boa 运行时会自动去找 /etc/bon.conf 文件。 这个设定是在 define.h 文件中定义的,可在编译之前进行修改。 2. log 目录 : 分为 Errorlog 和 AccessLog 两个
写在前面: boa相关目录:
1. boa.conf 的存放目录:
默认boa.conf是在/etc/boa.conf目录的,boa运行时会自动去找/etc/bon.conf文件。
这个设定是在define.h文件中定义的,可在编译之前进行修改。
2. log目录: 分为 Errorlog 和 AccessLog 两个目录,可在boa.conf中修改。
如:
ErrorLog /var/log/boa/error_log
AccessLog /var/log/boa/access_log
3. html文件存放目录, 可在boa.conf文件中修改。
如: DocumentRoot /var/www
4. cgi脚本存放目录, 可在boa.conf文件中修改。
如: ScriptAlias /cgi-bin/ /var/www/cgi-bin
5. mime.types存放目录 , 可在boa.conf文件中修改。
如: MimeTypes /etc/mime.types
=======================================================
移植boa服务
=======================================================
一. 编译boa程序
1. www.boa.org下载boa-0.94.13.tar.gz
2. 解压: tar –zxvf boa-0.94.13.tar.gz
3. 进入boa-0.94.13/src目录, 执行./configure
4. make
编译时用2.95.3以上的版本会出错:
util.c: 100: 1: pasting “t” and “->” does not give a valid preprocessing token make: [util.o] Error1
解决方法:
方法1>. 修改compat.h中的
#define TIMEZONE_OFFSET(foo) foo## ->tm_gmtoff
为:
#define TIMEZONE_OFFSET(foo) foo->tm_gmtoff
方法2>. 改用2.95.3版本的编译器。
二. 修改配置文件boa.conf
1. 建立/etc/boa目录, 并复制boa.conf到/etc/boa目录下,并按照以下步骤进行修改。
2. 修改访问权限: 修改User nobody 为 User 0 ; 修改Group nogroup 为 Group 0
3. 设定日志目录:boa日志有两部分,Errorlog 和 AccessLog
一般情况下为/var/log/boa/error_log 和 /var/log/boa/access_log两个文件。所以根据自己的情况情况设置日志目录:
ErrorLog /var/log/boa/error_log
AccessLog /var/log/boa/access_log
(注意:这里/var/log/boa目录必须为可写,否则会出项错误:log.c:73 – Unable to dup2 the error log: Bad file r.)
4. 设置html文件目录: DocumentRoot /var/www
5. 设置默认首页: DirectoryIndex index.html
6. 设置cgi脚本目录: 将
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin
修改为
ScriptAlias /cgi-bin/ /var/www/cgi-bin
三. 根据第二步设置建立相关文件夹并放入文件:
1. 根据(第二.3步)的设置建立/var/boa 文件夹 。
2. 根据(第二.4步)的设置建立/var/www 文件夹 , 并在此目录下存放html文件(包括index.html文件)。
3. 根据(第二.6步)的设置建立/var/www/cgi-bin 文件夹 , 并存放一些用来测试的cgi脚本。
四. OK,运行boa程序。
在windows 下通过http://172.20.223.151这种形式访问,进行测试。
五. 移植到开发板
1>. (第一.3步)操作完成之后,修改Makefile文件:
将:
CC = gcc
CPP = gcc -E
该为:
CC = arm-linux-gcc
CPP = arm-linux-gcc -E
make即可。
2>. 拷贝PC上/etc/mime.types文件到开发板/etc目录下
(或者将boa.conf文件中 MimeTypes /etc/mime.types 修改为: MimeTypes /dev/null )
六. 常见错误:
1>. 错误1: gethostbyname:: No such file or directory
解决办法: 修改boa.conf 去掉 ServerName www.your.org.here 前的注释符号(#)
2>. 错误1: util.c:100:1: error: pasting "t" and "->" does not give a valid preprocessing token make: *** [util.o]

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



Pinduoduo software provides a lot of good products, you can buy them anytime and anywhere, and the quality of each product is strictly controlled, every product is genuine, and there are many preferential shopping discounts, allowing everyone to shop online Simply can not stop. Enter your mobile phone number to log in online, add multiple delivery addresses and contact information online, and check the latest logistics trends at any time. Product sections of different categories are open, search and swipe up and down to purchase and place orders, and experience convenience without leaving home. With the online shopping service, you can also view all purchase records, including the goods you have purchased, and receive dozens of shopping red envelopes and coupons for free. Now the editor has provided Pinduoduo users with a detailed online way to view purchased product records. method. 1. Open your phone and click on the Pinduoduo icon.

Whether it is an article, paper or tutorial, the main highlight of any document is the title and of course the table of contents. It describes the outline structure of the document so that users can get to where and what they expect to read from the document. It's also a best practice to add a table of contents to most documents to make them look more professional. Today, everything happens online and people use Google Docs to create most documents. Many users are still not sure how to insert or add a table of contents in google docs. Therefore, we come up with this article to explain how to create or insert a table of contents in Google Docs. How to Insert a Table of Contents in Google Docs Step 1: Click here to visit Google Docs Online. Step 2: If

Use Java's File.isDirectory() function to determine whether a file exists and is of directory type. In Java programming, you often encounter situations where you need to determine whether a file exists and is of directory type. Java provides the File class to operate files and directories. The isDirectory() function can help us determine whether a file is a directory type. The File.isDirectory() function is a method in the File class. Its function is to determine the current File

How to View Command History in Linux In Linux, we use the history command to view the list of all previously executed commands. It has a very simple syntax: history Some options for pairing with the history command include: Option description -c clears the command history for the current session -w writes the command history to a file -r reloads the command history from the history file -n Limit the number of output of recent commands Simply run the history command to see a list of all previously executed commands in a Linux terminal: In addition to viewing command history, you can also manage command history and perform modifications to previously executed commands , reverse search command history or even delete history completely

Call recording in iPhone is often underestimated and is one of the most critical features of iPhone. With its simplicity, this feature is of vital importance and can provide important insights about the calls made or received on the device. Whether for work purposes or legal proceedings, the ability to access call records can prove invaluable. In simple terms, call history refers to the entries created on your iPhone whenever you make or receive a call. These logs contain key information, including the contact's name (or number if not saved as a contact), timestamp, duration, and call status (dialed, missed, or not answered). They are a concise record of your communication history. Call history includes call history strips stored on your iPhone

PHP function introduction—rename(): Renaming files or directories Introduction: In PHP, the rename() function is used to rename files or directories. It provides an easy way to change the name of a file or directory. Whether it is a single file or an entire directory, you can use this function to perform a rename operation. The renaming process can be easily accomplished by specifying the name of the source file or directory and the target name. Syntax: boolrename(string$source,str

The glob() function in PHP is used to find files or directories and is a powerful file operation function. It can return the path of a file or directory based on a specified pattern match. The syntax of the glob() function is as follows: glob(pattern, flags) where pattern represents the pattern string to be matched, which can be a wildcard expression, such as *.txt (matching files ending with .txt), or a specific file path. flags is an optional parameter used to control the function

iPhone lets you add medications to the Health app to track and manage the medications, vitamins and supplements you take every day. You can then log medications you've taken or skipped when you receive a notification on your device. After you log your medications, you can see how often you took or skipped them to help you track your health. In this post, we will guide you to view the log history of selected medications in the Health app on iPhone. A short guide on how to view your medication log history in the Health App: Go to the Health App>Browse>Medications>Medications>Select a Medication>Options&a
