Single haproxy instance running on http as well as tcp mode

I have two web applications running on a server inside two separate docker containers, one of them is running on play framework server (java), while other is running on nginx (php). I am doing ssl termination in http mode at haproxy for the play app. I want to handle the ssl termination for other app at nginx.
Is it possible to configure haproxy in such a way, so that one front-end forwards the request in tcp mode, and another in http mode. Below is how my haproxy.cfg would look like.

frontend http-in
        mode http
        bind *:80
        redirect scheme https code 301 if !{ ssl_fc }


frontend https-in
#        bind *:80
        bind *:443 ssl crt /etc/ssl/certs/my_certificate_file.pem
        reqadd X-Forwarded-Proto:\ https
#        redirect scheme https code 301 if !{ ssl_fc }
        mode http
        option httpclose
        option forwardfor
        # Define hosts based on domain names
        acl host_test_ssh hdr(host) -i playapp.domain.com

        ## figure out backend to use based on domainname
        use_backend testssh if host_test_ssh

frontend http-in-other
        bind *:80
        mode tcp
        option tcplog
        redirect scheme https if !{ ssl_fc }

frontend https-in-estore
        bind *:443
        mode tcp
        option tcplog
        # Define hosts based on domain names
        acl host_test_ssh hdr(host) -i nginxapp.domain2.com

        ## figure out backend to use based on domainname
        use_backend other if host_test_ssh

  • Running Docker on Mac, build works, run errors: : /bin/sh: 1: [: missing ]
  • Deploying multi-docker local setup to AWS using Elastic Beanstalk
  • Chaos Monkey equivalent for Docker?
  • running a docker loop device on aws
  • How to map the current host directoy to a Docker container on Windows?
  • How to edit /etc/hosts file in running docker container
  • Why “docker attach” not working and blocking my konsole on ubuntu
  • dial unix /var/run/docker.sock: no such file or directory after upgrading to lxc-docker
  • Install SCP in Docker container
  • Unable to activate chef-provisioning-docker-0.6 because chef-provisioning-1.1.1 conflicts with chef-provisioning (~> 0.9)
  • Assign network aliases dynamically on global deployed services in a docker stack
  • Obtaining a docker image's parent images
  • One Solution collect form web for “Single haproxy instance running on http as well as tcp mode”

    I have not tried this but based on the documentation of 1.5 it should work. http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#4.2-mode

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.