# 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
阅读(2128) | 评论(0) | 转发(0) |