Hi All,
I have somewhat the following config for relayd running on 6.1.
And I am trying to forward certain request paths to different hosts.
table <wwwhost> { xx.xx.xx.131 }
table <otherhost> { xx.xx.xx.31 }
http protocol httpsfilter {
match request header remove "Proxy"
match request header append "X-Forwarded-For" value "$REMOTE_ADDR"
match request header append "X-Forwarded-By" value
"$SERVER_ADDR:$SERVER_PORT"
match response header set "Server" value "Sever"
match response header set "X-Powered-By" value "Power"
match response header set "X-Frame-Options" value "SAMEORIGIN"
match response header set "X-Xss-Protection" value "1; mode=block"
match response header set "X-Content-Type-Options" value "nosniff"
match request quick path "/crm/" forward to <otherhost>
tcp { no splice }
}
relay host_tls {
listen on $ext_addr_v4 port 443 tls
listen on $ext_addr_v6 port 443 tls
protocol httpsfilter
forward to <wwwhost> port 80 check http "/" host example.com code 200
forward to <otherhost> port 80
}
I have tried both "match request quick path" and "match request quick url" but
what I noticed is that as soon as you have visited one of the URLs that needs
forwarding to a different host you end up at the <otherhost> for all subsequent
requests.
With "match request quick url" this is to be expected as it checks everything
up to /.
For example:
http://example.com/ -> wwwhost
http://example.com/crm/ -> otherhost
http://exmaple.com/folder/ -> otherhost
Is this expected behaviour for "match request quick path" as well?
Is there any way to do this type of load balancing?
Thanx!!
Mischa
--
You received this mail because you are subscribed to [email protected]
To unsubscribe, send a mail to: [email protected]