· 安装pcre
http://sourceforge.net/projects/pcre/files/pcre/· 安装lighttpd
shell> tar zxvf lighttpd-1.4.33.tar.gzshell> cd lighttpd-1.4.33shell> ./configure –prefix=/usr/local/lighttpdshell> ./makeshell> ./make installshell> cp doc/initscripts/rc.lighttpd /etc/rc.d/init.d/lighttpdshell> cp doc/initscripts/sysconfig.lighttpd /etc/sysconfig/lighttpdshell> mkdir /etc/lighttpdshell> cp -r doc/config /etc/lighttpdshell> chkconfig lighttpd on· 配置lighttpd
修改/etc/rc.d/init.d/lighttpd的LIGHTTPD_BIN的值如下LIGHTTPD_BIN=”/usr/local/lighttpd/sbin/lighttpd”打开/etc/lighttpd/lighttpd.conf修改服务的端口设置代理$HTTP["url"] =~ "^/test/(.+)?$" { proxy.server = ( "" => ( ( "host" => "127.0.0.1", "port" => 10002 ) ) )}配置home目录打开/etc/lighttpd/modules.conf使能"mod_proxy"· 运行lighttpd
shell> service lighttpd start