Works a charm, thanks :)

On 10/01/2012 10:00 PM, Baptiste wrote:
Because it matches the Host header and not the path!

Do it like that to prevent redirecting /:
acl slash path /
acl static path_end js css
reqirep ^Host:\ .*\.mydomain\.nl   Host:\ static.domain.nl if static !slash

cheers

On Mon, Oct 1, 2012 at 9:10 PM, Fred Leeflang<[email protected]>  wrote:
Hi,

I'm just doing more testing and showing varnishtop -b -i TxURL with this
config
and I see all the js/css/jpg etc. BUT I also see '/'.

I can't figure out why haproxy would match '/' on the static acl, any clues?

-Fred


On 09/28/2012 06:45 AM, Baptiste wrote:
Hi,

Yes, it is possible to do this:
acl static path_end js css
reqirep ^Host:\ .*\.mydomain\.nl   Host:\ static.domain.nl if static


Note that if you want some tips about HAProxy and Varnish, you can
read this blog article:

http://blog.exceliance.fr/2012/08/25/haproxy-varnish-and-the-single-hostname-website/

Cheers


On Fri, Sep 28, 2012 at 6:21 AM, Fred Leeflang<[email protected]>   wrote:
Hi,

Our haproxy loadbalances *.domain.nl so there's lots of different sites
to
it. Each site shares a fair amount of pictures, javascript and CSS which
are
all the same; these are served from a varnish cache.

Is it possible for haproxy to rewrite the URL of pics/js/css from
http://*.domain.nl/[js|css|...] to http://static.domain.nl/[js|css|...]
such
that the varnish cache will not cache all those images multiple times?

Thanks for any help,
Fred Leeflang




Reply via email to