ubuntu下的lighttpd
ubuntu下的lighttpd
1、安装lighttpd
sudo apt-get install lighttpd
2、
使用lighttpd代理tomcat或者jboss等动态应用
在
/etc/lighttpd/lighttpd.conf 的末尾加入下面的内容:
$HTTP["host"] == "192.168.4.41" {
proxy.balance = "hash"
proxy.server = ( "/video" => ( ( "host" => "192.168.4.41", "port" => 2006 ) ) )
}
激活mod_proxy,主要在里面加入了"mod_proxy"
server.modules = (
# "mod_rewrite",
# "mod_redirect",
# "mod_alias",
"mod_access",
# "mod_cml",
# "mod_trigger_b4_dl",
# "mod_auth",
# "mod_status",
# "mod_setenv",
# "mod_fastcgi",
"mod_proxy",
# "mod_simple_vhost",
# "mod_evhost",
# "mod_userdir",
# "mod_cgi",
# "mod_compress",
# "mod_ssi",
# "mod_usertrack",
# "mod_expire",
# "mod_secdownload",
# "mod_rrdtool",
"mod_accesslog" )
3、重启lighttpd
/etc/init.d/lighttpd restart