- 论坛徽章:
- 0
|
自己搞定,发上来,已做备忘之用
自己搞定,贴上来,以做备忘之用
独孤九贱 2006-02-15 22:25
# Redhat Linux 9.0(2.40. +mini_thttpd 1.19(+SSL+CGI)
1、打开Makefile中的SSL标志;
2、修改SSL_TREE = /usr/share/ssl
3、在Shell中输入:
export LOCALDEFS="-DOPENSSL_NO_KRB5"
export C_INCLUDE_PATH="/usr/kerberos/include"
4、编译:make;make install
5、make cert 生成mini_httpd.pem,再拷贝到/etc下
6、建立配置文件/etc/mini_httpd_config
#The -D flag tells mini_httpd to *not* put itself into the background
debug
# Specifies a directory to chdir() to at startup.
dir=/var/web
# Specifies an alternate port number to listen on
port=8887
# CGI programs path
cgipat=cgi-bin/*
# Specifies a hostname to bind to
host=0.0.0.0
# Specifies what user to switch to after initialization when started as root.
user=root
# pid file path
pidfile=/var/run/mini_httpd.pid
# log file path
logfile=/var/log/mini_httpd.log
# Specifies the character set to use with text MIME types.
charset=GB2312
# It is available to enable SSL/HTTPS feature.
ssl
# Specify a server certificate with this flag.
certfile=/etc/mini_httpd.pem
运行:
mini_httpd -C /etc/mini_httpd_conf
也可以用源码下的scripts下的两个脚本来管理启动
未解决的问题:
没有使用-r 进行chroot(),因为我的CGI程序要常常去访问根文件系统中的某些文件和库文件,如果使用了-r,会让CGI程序无法运行;
问题是:
A、使用了-r,如何让CGI程序正常运行,包括日志记录至根文件系统的指定文件中;
B、不使用-r,如何关闭程序的
/usr/local/sbin/mini_httpd: started as root without requesting chroot(), warning only
报怨语句
[ 本帖最后由 独孤九贱 于 2006-2-15 22:24 编辑 ] |
|