Appweb开发指南

  • 格式:doc
  • 大小:99.00 KB
  • 文档页数:11

Appweb开发指南

编译及安装

下载appweb-src-3.2.2-1.tar.gz和appweb-patch-matrixssl.zip,将其解压至工作目录;

编译matrixssl,matrixssl目录下有两个版本matrixssl-1-8-8-open和matrixssl-3-1-2-open,由于appweb目前只支持matrixssl-1-8-8-open,所以我们只需要编译matrixssl-1-8-8-open即可,且Makefile默认也是编译matrixssl-1-8-8-open;

进入matrixssl目录进行编译:cd matrixssl; make

进入appweb目录,执行下面的命令进行编译:

./configure --build=i686-pc-linux --type=DEBUG --enable-log --enable-multi-thread

--enable-upload --enable-auth --enable-auth-file --enable-auto-compile

--with-matrixssl=/home/hhb/matrixssl/matrixssl-1-8-8-open

make

安装:make install (必须要使用root执行)

配置及运行

为了快速完成配置,我们只要把安装后的文件拷贝到编译目录下即可;

把/etc/appweb目录下的拷贝到编译目录即可:appweb.conf, conf/, groups.db, users.db,

mime.types

修改appweb.conf:

ServerRoot "/home/hhb/appweb"

Listen 80

DocumentRoot "/home/hhb/appweb/doc"

LoadModulePath "/home/hhb/appweb/modules"

修改conf/hosts/ssl-default.conf:

DocumentRoot "/home/hhb/appweb/doc"

如果ssl端口有冲突(默认4443)则需要修改如下:

Listen 443

制作证书:

把test目录下的ssl目录拷贝出来,放至appweb工作目录下即可。

注意:ssl目录下有Makefile专门用来生成证书,大家有时间可以自己去看一下openssl命令

启动appweb:

设置appweb的运行路径:vi .bashrc

PATH=/home/hhb/appweb/bin:$PATH

保存后执行

source .bashrc

运行:

appweb --log stdout:4 &

为方便大家定位错误,下面我把正常运行打印的日志贴出来:

appweb: 2: Configuration for Embedthis Appweb

appweb: 2: ---------------------------------------------

appweb: 2: Host: linux-ebxd

appweb: 2: CPU: i686

appweb: 2: OS: LINUX

appweb: 2: Distribution: suse Linux

appweb: 2: Version: 3.2.2-1

appweb: 2: BuildType: DEBUG

appweb: 2: ---------------------------------------------

linux-ebxd:/home/hhb/appweb # appweb: 4: Already logging. Ignoring ErrorLog directive

appweb: 4: Already logging. Ignoring LogLevel directive

appweb: 2: Server Root "/home/hhb/appweb"

appweb: 2: DocRoot (Main Server): "/home/hhb/appweb/doc"

appweb: 2: Set connector "netConnector"

appweb: 4: Probe for filename mod_auth

appweb: 4: Probe for library mod_auth.so

appweb: 4: Probe for filename /home/hhb/appweb/modules/mod_auth

appweb: 4: Probe for library /home/hhb/appweb/modules/mod_auth.so

appweb: 4: Found package mod_auth at /home/hhb/appweb/modules/mod_auth.so

appweb: 3: Loading module mod_auth from /home/hhb/appweb/modules/mod_auth.so

appweb: 2: Activating module (Loadable) authFilter

appweb: 2: Add filter "authFilter" to location "" for all extensions

appweb: 4: Probe for filename mod_range

appweb: 4: Probe for library mod_range.so

appweb: 4: Probe for filename /home/hhb/appweb/modules/mod_range

appweb: 4: Probe for library /home/hhb/appweb/modules/mod_range.so

appweb: 4: Found package mod_range at /home/hhb/appweb/modules/mod_range.so

appweb: 3: Loading module mod_range from /home/hhb/appweb/modules/mod_range.so

appweb: 2: Activating module (Loadable) rangeFilter

appweb: 2: Add filter "rangeFilter" to location "" for all extensions

appweb: 4: Probe for filename mod_chunk

appweb: 4: Probe for library mod_chunk.so

appweb: 4: Probe for filename /home/hhb/appweb/modules/mod_chunk

appweb: 4: Probe for library /home/hhb/appweb/modules/mod_chunk.so appweb: 4: Found package mod_chunk at /home/hhb/appweb/modules/mod_chunk.so

appweb: 3: Loading module mod_chunk from /home/hhb/appweb/modules/mod_chunk.so

appweb: 2: Activating module (Loadable) chunkFilter

appweb: 2: Add filter "chunkFilter" to location "" for all extensions

appweb: 4: Probe for filename mod_upload

appweb: 4: Probe for library mod_upload.so

appweb: 4: Probe for filename /home/hhb/appweb/modules/mod_upload

appweb: 4: Probe for library /home/hhb/appweb/modules/mod_upload.so

appweb: 4: Found package mod_upload at /home/hhb/appweb/modules/mod_upload.so

appweb: 3: Loading module mod_upload from /home/hhb/appweb/modules/mod_upload.so

appweb: 2: Activating module (Loadable) uploadFilter

appweb: 2: Upload directory: /tmp

appweb: 2: Add filter "uploadFilter" to location "/test/upload" for all extensions

appweb: 3: If "PHP_MODULE" conditional is false at

/home/hhb/appweb/conf/modules/php.conf:120

appweb: 4: Probe for filename mod_ejs

appweb: 4: Probe for library mod_ejs.so

appweb: 4: Probe for filename /home/hhb/appweb/modules/mod_ejs

appweb: 4: Probe for library /home/hhb/appweb/modules/mod_ejs.so

appweb: 4: Found package mod_ejs at /home/hhb/appweb/modules/mod_ejs.so

appweb: 3: Loading module mod_ejs from /home/hhb/appweb/modules/mod_ejs.so

appweb: 4: ejs: set default search path to /home/hhb/appweb/bin:/home/hhb/appweb/modules:.

appweb: 3: ejs: set search path to

/home/hhb/appweb/bin:/home/hhb/appweb/modules:.:/home/hhb/appweb/modules

appweb: 3: Loading module /home/hhb/appweb/modules/ajs.mod

appweb: 2: Activating module (Loadable) ejsHandler

appweb: 2: Add handler "ejsHandler" for ".ejs"