搭建Tomcat与lighttpd环境
· 安装pcre
http://sourceforge.net/projects/pcre/files/pcre/
· 安装lighttpd
shell> tar zxvf lighttpd-1.4.33.tar.gz
shell> cd lighttpd-1.4.33
shell> ./configure –prefix=/usr/local/lighttpd
shell> ./make
shell> ./make install
shell> cp doc/initscripts/rc.lighttpd /etc/rc.d/init.d/lighttpd
shell> cp doc/initscripts/sysconfig.lighttpd /etc/sysconfig/lighttpd
shell> mkdir /etc/lighttpd
shell> cp -r doc/config /etc/lighttpd
shell> 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