SNI and AFLEX

edited August 2023 in aFleX
Hi all,
I have a problem with aflex configured on a VIP with a SNI template applied. On the VIP I have exposed application for domain1 (the default certificate in the SSL template) and 2 services for domain2. SNI template i sworking fine but now I need to add on the VIP an aflex like this:

#Rewrite
if {[HTTP::host] matches "<host.domain2>"} {
if {([HTTP::uri] starts_with "/newsletters") } {
pool sg_pool2
}
}

The problem is that when I recall host.domain2 the aflex is never matched so I cannot pool on the correct service group when /newsletters is inside URI. If I remove SNI template the aflex is correctly matched, is there a way to do that with SNI?

Thanks in advance

Luca
Tagged:

Comments

  • edited January 2018
    Hi Luca,

    It sounds to me like a score issue. I suggest you to file a support ticket in order to identify and fix it.

    Kind Regards,

    Manuel
  • edited January 2018
    Hi Manuel,
    thank you I solved. It wasn't a problem related to the SNI itself but an incorrect aflex applied to the VIP.

    Luca
  • edited January 2018
    Well. good stuff!

    Shall I propose you to post the solution aFlex here, so we can leverage also on what you learnt ?
    Cheers,

    Manuel
  • edited January 2018
    Sure, the problem was that I needed to balance on different SG based on the URI called on a single host. On the same VIP was applied SNI but the SG wasn't correctly choosed. I thought the issue was related to the SNI instead it was on the aflex that choose SG, Underneath the correct one:

    if {[HTTP::host] matches_regex "(site1|site2)\.example.com"} {
    set lbpool "sg_gen_1"
    if {([HTTP::uri] equals "/")} {
    HTTP::redirect https://[HTTP::host]/test1
    }

    if {([HTTP::uri] starts_with "/newsletters") or ([HTTP::uri] starts_with "/datasheet")} {
    set lbpool "sg_gen_2"
    }
    pool $lbpool
    }
Sign In or Register to comment.