Hi,

Here is on example
--
global
        maxconn 65000
        ulimit-n 65535
        uid 0
        gid 0
        daemon       
        stats socket /var/run/haproxy.stat level admin
        nbproc 1

defaults
        maxconn         40000
        retries 10
        option  redispatch
        option  http-server-close
        option  forceclose
        option  tcp-smart-accept
        option  tcp-smart-connect
       
        contimeout      15s
        clitimeout      30s
        srvtimeout      60s

listen app1
        bind :8080
        mode http
        maxconn 200
        stats enable
        stats uri /

frontend fe_default
        bind :80
        bind 0.0.0.0:443 ssl crt /etc/ssl/test/ id 100
        acl ssl-proxy so_id 100
        reqadd x-forwarded-proto:\ https if ssl-proxy
        mode http
        option forceclose
        option httpclose
        option  accept-invalid-http-request
        reqidel ^X-Forwarded-For:.*
        maxconn 20000
        monitor-uri /haproxycheck
        default_backend bk_default

backend bk_default
        mode    http
        balance roundrobin
        appsession JSESSIONID len 120 timeout 360min request-learn
        cookie JSESSIONID prefix
        balance roundrobin
        server 01 172.16.37.130:80 cookie f01 check maxconn 200
slowstart 180s
        option forwardfor
        server  static-01 172.16.37.130:80 cookie f01 maxconn 200 backup
check

--

On 09.12.2012 03:51, S Ahmed wrote:
> I want to setup SSL and for it to stop at the haproxy level (i.e.
> backend server communication shouldn't use SSL).
>
> How do I set up SSL with haproxy?

This example is listen on port 80 unsecured and 443 secured. If the
secured connection is used a header x-forwarded-proto is inserted.
Hope, that helps you to go forward.

cheers,
thomas


Reply via email to