On Die 03.06.2008 12:26, Leo Catalinas wrote:
> (answers inline at the end)
>
> Aleksandar Lazic escribió:
>> Hi,
>>
>> On Fre 30.05.2008 08:33, Leo Catalinas wrote:
>
>>> if requests contains domain "www.example.com" and url_path
>>> "/hireforms/" then replace "^http://" with "https://".
>>
>> [snipp]
>>
>>> I think it shouldn't be complicated but I spent some time playing
>>> with reqirep and rspirep and I didn't achieve the purpose.
>>>
>>
>> acl https_header domain www.example.com and url /hireforms/
>>
>> use_backend https if https_header
>> use_backend https if !https_header
>>
>> backend https
>> .
>> .
>> .
>> reqrep ...
> success
>
>>
>> backend http
>> .
>> .
>> .
> to redirect the browser. All the servers belongs to the same backend,
> and I'd prefer not to create separated backends for the two
> things. Also, all SSL work is done in the haproxy host by Stunnel.
>
>>
>> please take a look into the configuration.txt for the right syntax ;-)
>>
>> I'am now in hurry but if you can wait I can try to write the full acl in
>> the next week ;-)
>
> Thanks!
I would start with this.
###
acl dom url_dom www.example.com
acl secure_path path_beg /hireforms/
use_backend https_add if dom and secure_path
default_backend http
backend https_add
reqirep (http)(.*) \1s\2 reqsetbe http backend http . . .
of course I would also run with
./haproxy -f config.cfg -Vdv
to see how the requests are.
Aleks Received on 2008/06/04 23:32
This archive was generated by hypermail 2.2.0 : 2008/06/04 23:45 CEST