Lighttpd rewite url from specific client when using proxy
Posted
by
Edu
on Server Fault
See other posts from Server Fault
or by Edu
Published on 2012-09-20T08:13:23Z
Indexed on
2012/09/20
9:40 UTC
Read the original article
Hit count: 174
I need to send all CGI request to another server so I decided to use it with proxy. The problem is that I need to send the client IP to the server so I did the following configuration:
$HTTP["url"] =~ "cgi" {
$HTTP["remoteip"] =~ "^(.*)$" {
url.rewrite-once = ("^(.*)$" => "$1?myip=%1")
}
proxy.server = (
"" =>
(
( "host" => "XXX.XXX.XXX.XXX",
"port" => 80,
)
)
)
}
the problem is that its not rewriting the URL.
© Server Fault or respective owner