Hi All,

I am repeating my question again coz all the suggestions din't here

I am having 4 servers

server1
server2
server3
server4


Now what i want

if any request come from dev1.server.com that should forward to tcp on
server4 and the normal opertion should be between the rest there servers

I am using below configuration file but that is not working

Please check the below config and provide me proper solution

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
global
    log         127.0.0.1 local0
    log         127.0.0.1 local1 debug
    chroot      /var/lib/haproxy
    pidfile     /var/run/haproxy.pid
    maxconn     4000
    user        haproxy
    group       haproxy
    daemon
    stats socket /var/lib/haproxy/stats

defaults
    mode                    http
    log                     global
    option                  tcplog
    option                  dontlognull
    option http-server-close
    option                  redispatch
    retries                 3
    timeout http-request    10s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m
    timeout server          1m
    timeout http-keep-alive 10s
    timeout check           10s
    maxconn                 3000

frontend haproxy_in
        bind *:80
        default_backend haproxy_http
    option httplog
    acl host1 hdr(host) -i dev1.server.com

    use_backend haproxy_http_tcp if host1
backend haproxy_http
        balance roundrobin
        mode http
        server server1 server1:80         weight 1 maxconn 512 check
    server server2 server2:80         weight 1 maxconn 512 check
    server server3 server3:80         weight 1 maxconn 512 check

backend haproxy_http_tcp
    bind *:443
    mode tcp
        option tcplog
    server server4 server4:80         weight 1 maxconn 512 check


#listen https
#    bind *:443
#    mode tcp
#    option tcplog
#    balance roundrobin
#       server vm1 prdappc2n2:443      weight 1 maxconn 512 check


On Fri, Sep 18, 2015 at 12:24 PM, joris dedieu <[email protected]>
wrote:

> Hi,
>
> 2015-09-18 3:13 GMT+02:00 Nitesh Kumar Gupta <[email protected]>:
> > Hi,
> >
> > I want to setup haproxy in way there that will work on both http and
> https
> > and also tpc but that will be conditional mean if any perticular link
> will
> > come that will go via tcp
> >
> > So can you help me how can i setup this
>
> You may find a lot of useful ressources by searching how make ssh and
> https work on the same port with haproxy. This is a common case on
> using http and tcp stuff on the same port (to bypass corporate proxies
> I presume).
>
> Joris
>
>
> >
> > --
> > Regards
> > Nitesh Kumar Gupta
>



-- 
Regards
Nitesh Kumar Gupta

Reply via email to