应老大要求,研究了一下Mongoose服务器,在网上搜了一下资料还真少,以下内容是我通过网上整理的资料:
官网地址:http://code.google.com/p/mongoose/
Mongoose的老家在Google Codec网站,属于开放源代码小型Web服务器,轻量级、高性能是它的主要优点,其他特色也不少:
多平台支持。目前支持Windows、Linux、UNIX和Mac。
CGI、SSL和SSI支持,还支持Digest(MD5)身份认证,断点续传。
基于IP的访问限制。
很小巧。Windows下大小为60KB,Linux下更是只有40KB。
支持多种编程语言。目前的2.8版本支持C/C++、Python、C#,到2.9版本将多支持Ruby、Lua等。
配置mongoose.conf文件即可支持PHP,以下是我配置的内容:
error_log_file error.log
cgi_extensions php
# cgi_environment <value>
# put_delete_passwords_file <value>
cgi_interpreter c:\root\php-cgi.exe
# protect_uri <value>
# authentication_domain mydomain.com
# ssi_extensions .shtml,.shtm
# access_log_file <value>
# ssl_chain_file <value>
# enable_directory_listing yes
# global_passwords_file <value>
index_files index.html,index.htm,index.cgi
# enable_keep_alive no
# access_control_list <value>
# max_request_size 16384
# extra_mime_types <value>
#端口
listening_ports 8092
#指定网站根目录,指到本人的Apache服务器里(根据自己的需要配置)
document_root D:\http
# ssl_certificate <value>
# num_threads 10
# run_as_user <value>