Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2884843
  • 博文数量: 674
  • 博客积分: 17881
  • 博客等级: 上将
  • 技术积分: 4849
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-17 10:15
文章分类

全部博文(674)

文章存档

2013年(34)

2012年(146)

2011年(197)

2010年(297)

分类: LINUX

2010-07-17 09:52:12

# 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   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
阅读(2015) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~