10年前文章_thttpd配置cgi

以下假设工作目录为 ~/work/lhs/

1、检出最新的版本

cd ~/work/lhs

svn update

2、在eclipse 中编译sample , 在debug 目录下有sample 程序

3、安装并设置thttpd , 配置文件如下(需要根据用户修改)

# BEWARE : No empty lines are allowed!
# This section overrides defaults
dir=/home/NieYingping/work/lhs/trunk/storapp/debug/
#chroot
user=thttpd         # default = nobody
logfile=/var/log/thttpd.log
pidfile=/var/run/thttpd.pid
cgipat=/cgi/*
# This section _documents_ defaults in effect
# port=80
# nosymlink         # default = !chroot
# novhost
# nocgipat
# nothrottles
# host=0.0.0.0
# charset=iso-8859-1

4、在浏览器中运行  http://hostname/cgi/sample, 确认有输出

posted on 2019-05-26 21:49  lydstory  阅读(538)  评论(0编辑  收藏  举报

导航