两种方法,可以根据自己情况来使用,但是根据网友所说,lighttpd的反代作用并不比nginx强。
在 /etc/lighttpd/vhosts (直接在lighttpd伪静态规则里添加)里加入 $HTTP["host"] =~ "(^sample.com)$" { proxy.server = ( "/sr/" => ( ( "host" => "x.x.x.x", "port" => 80 ) ) ) }
$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) )) }
lighttpd开启多端口访问的方法
$SERVER["socket"] == "ip:port" { }
有几个端口加几个
sicnature ---------------------------------------------------------------------
Your current IP address is: 18.206.194.21
Your IP address location: 美国弗吉尼亚阿什本
Your IP address country and region: 美国

Your current browser is:
Your current system is:
Original content, please indicate the source:
同福客栈论坛 | 蟒蛇科普 | 海南乡情论坛 | JiaYu Blog
sicnature ---------------------------------------------------------------------
Welcome to reprint. Please indicate the source https://www.myzhenai.com.cn/post/3207.html
没有评论