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

  • Docker Tutorial: Daemonized Container Closes - Syntax Error
  • Error response from daemon: Cannot checkpoint container CONTAINERID: Unable to execute CRIU command: criu
  • Nginx Load Balancing Upstream proxy
  • Why does running some docker images must add a command?
  • Can not register more than one subdomain this nginx and nginx-proxy with docker container
  • How to re-synchronize the Prometheus time?
  • How can I install the php memcached extension on Docker's PHP7 Alpine image?
  • Retrieve docker image ID
  • docker-compose up -d <name>; No such service: <name>
  • Running Docker on Mac, build works, run errors: : /bin/sh: 1: [: missing ]
  • How to define a variable in a Dockerfile?
  • Parse docker logs with logstash
  • 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.