我必须通过example.org上的lighty代理一个在外部网站上托pipe的网站。 我的configuration到目前为止:
$HTTP["url"] =~ "^/webmail" { proxy.server = ("/webmail/" => ( # this entry should link to example2.org ("host" => "1.2.3.4", "port" => 80) )) }
Web空间提供程序已将我的域configuration为vhost。 所以,如果我访问http://1.2.3.4/webmail/ lighttpd将只提供网站空间提供商的主要网站,说:“网站example.org没有在我们的服务器上find”。
任何build议如何我必须configurationlighty代理网站,只托pipe为虚拟主机(并没有自己的IP)?
我相信这可以用mod_setenv修复 :
$HTTP["url"] =~ "^/webmail" { # add host header setenv.add-request-header ( "Host" => "example2.org" ) proxy.server = ("/webmail/" => ( # this entry should link to example2.org ("host" => "1.2.3.4", "port" => 80) )) }