Discussion:
Forward request with the URL path
Rakesh G K
2014-01-15 07:36:53 UTC
Permalink
Hello,
Is it possible to forward an incoming request to the *backend *by retaining
the URL path in *http *mode?.
Using *ACLs *I was able to categorize the incoming requests to different
rulesets, but on using a specific *backend *for a certain URL parth, I
could not figure out how to send the request to the underlying server *with
*the URL path?.

I figured out how to redirect a request, but that is not what I wanted.

So, if HAProxy receives a request on, say *http://192.168.5.10:80/url/path
<http://192.168.5.10:80/url/path>* , I want the request to be sent to the
underlying server as *http://133.168.5.20:80/url/path
<http://133.168.5.20:80/url/path>.*

Does anyone know how to do this?. Any help is much appreciated!.

PS: Question on ServerFault :
http://serverfault.com/questions/566862/haproxy-url-pattern-forwarding

Thanks,
Rakesh
Jonathan Matthews
2014-01-15 09:50:07 UTC
Permalink
Post by Rakesh G K
Hello,
Is it possible to forward an incoming request to the backend by retaining
the URL path in http mode?.
Using ACLs I was able to categorize the incoming requests to different
rulesets, but on using a specific backend for a certain URL parth, I could
not figure out how to send the request to the underlying server with the URL
path?.
I don't quite understand. Are you finding that, without having
configured it to do so, haproxy is *changing* the URI path when it
proxies the request to your backends? Have you verified this with
tcpdump?

I would expect the opposite to be the case, as *not* changing the path
the default behaviour. I think you've probably got something else
going wrong here, that causes your backend to produce "Not Found on
Accelerator" (as per the SO question). That error isn't one that
haproxy generates.

Get tcpdump out. It'll show you where the problem is.

Jonathan

Loading...