Some Questions

From: eni-urgence <eni-urgence#scan-eco.com>
Date: Tue, 13 Jul 2010 16:02:18 +0200


Hello everybody.

  1. I want to use the errorfile directive in the configuration in order to display a custom html page (on proxy disk). Is it possible to include an image file in those pages ? And if not, if I use html page stored on a webserver, can I include image and css ?
  2. I want to make a advanced redirection too. I want something like this : if the url begin by www and the last uri dir is in a file then haproxy redirect to https://secure.mydomain1.tld/customer1/ I'm using mass virtualhost on my apache backend and for each domain name, the sub directories are the same. examples : request on http://www.domain1.com/customer1/ redirect to https://secure.domain1.com/customer1/ http://www.domain2.com/customer1/ redirect to https://secure.domain2.com/customer1/ http://www.domain2.com/customer2/ dont redirect because customer2 is not in the file.

At this time, I have made this in the config file :

        acl is_www hdr_beg -i www
        acl is_customer path_dir -f /var/chroot/haproxy/acl/customer.lst
      

but i have a problem with the redirect directive because part of the "to" option is given in the requested url : subdirectories and domain name. Is it possible to extract only the domain name (without server name) , store it in a variable and reuse it in redirect directive ? extract domain1.tld from http://www.domain1.tld/customer1/ Is it possible to extract the last dir from uri ? extract customer1 from http://www.domain1.tld/customer1/

    3) Is it possible to define the Max age of the cookie with Haproxy ? Or is it better to make it in the code ?

Thanks to all
NICOLE Emerik
Newbie french use of haproxy Received on 2010/07/13 16:02

This archive was generated by hypermail 2.2.0 : 2010/07/13 16:15 CEST