i may very well be wrong, since i don't have a lot of experience with
haproxy, and am currently trying to get my head around combining  acl's for
use with monitor fail if / monitor fail unless,
but i think it should be:

redirect scheme https code 301 if !is_http-site_org_au

On 8 July 2015 at 02:06, Peter Butler <[email protected]> wrote:

> I am trying to redirect all HTTP to HTTPS except for 1 site.
>
> The below redirects everything because redirect are processed before
> use_backend.
>
> part of my issue is i have heaps of sites requiring HTTPS, and use
> *.wildcard certs, and like the simplicity of it.  So would prefer not to be
> listing all sites specifically in the config, just the one I want to keep
> on http
>
> Any ideas please.
>
>
>
> frontend unsecure 10.0.0.1:80
>    mode http
>    acl is_http-site_org_au hdr_end(host) -i www.site.org.au
>    acl is_http-site_org_au hdr_end(host) -i site.org.au
>    use_backend http_site_org_au if is_http-site_org_au
>
>
> Things I have tried.
>   #redirect scheme https code 301 if !is_www_site_org_au
>   #redirect scheme https code 301 if !{ hdr(Host) -i www.site.org.au } !{
> ssl_fc }
>   #redirect scheme https code 301 if !{ ssl_fc }  !is_www_site_org_au
>
>
>
> backend http_site_org_au
>    mode http
>    option tcp-check
>    server site-02 10.1.1.1:80 check
>
>

Reply via email to