lighttpdでプロキシ+リライトを設定しようとしています。lighttpdリダイレクトして内部サーバに書き換えます
私は2つの別々のサーバーにプロキシをリバースしようとしています。最初のファイルはルート(192.168.1.198:7000)にあり、2番目のファイルは/ ram /ディレクトリ(192.168.1.197:8000)からアクセスされます。私はlighttpdのバージョン1.4.38-1を使用しており、アップグレードのオプションはありません。
以下は私のlighttpd.configの関連部分です、私は誰かが私のエラーを私に指摘することを望んでいる!
$SERVER["socket"] == ":82" {
url.rewrite-once = ("^/ram/(.*)$" => "/$1")
proxy.server = ("" => (
"" =>
("host" => "192.168.1.197",
"port" => 8000
)
)
)
}
else $HTTP["host"] == "subdomain.example.com" {
proxy.balance = "hash"
proxy.server = ("" => (("host" => "192.168.1.198", "port" => 7000)))
$HTTP["url"] =~ "(^/ram/)" {
proxy.server = ("" => (
"" =>
("host" => "127.0.0.1",
"port" => 81
)
)
)
}
}