Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4849

Https configuration for haproxy

$
0
0

Hello friends,

I’ve some web applications running on tomcat. There are two identical application servers for each applications and I want a loadbalancer to distribute the network traffic between those two servers.

Therefore I have configured haproxy to act as a loadbalancer and redirect http (80) port to real ports defined in application servers. It worked pretty well so far.

Now I’ve installed ssl certificates to tomcat servers and decided to make people access through https instead of http.

I could not find out how to configure haproxy to listen port 443 (https), distribute the network traffic as a loadbalancer and redirect ports.

Below is my configuration designed for http.
I’ve tried to simple change port numbers, change mode from http to https or tcp… none of them worked or I’ve done something wrong or missed something…
Can you please tell me how I must modify this config?

Please note that I’ve already applied ssl certificates in tomcat so I do not need haproxy to apply ssl certificates.

Probably this is something very simple for most of you but this is the first time I use haproxy without any training.

global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats timeout 30s
user haproxy
group haproxy
daemon

defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000

listen arserver
bind :33000
mode tcp
use_backend srvs_arserver

frontend http
bind *:80
mode http
#default_backend def

acl support base_reg ^.*support
acl smartit base_reg ^.*smartit

use_backend srvs_support if support
use_backend srvs_smartit if smartit

backend srvs_support
balance source #roundrobin
hash-type consistent # optional
server BMCHELIXDWP1 10.19.0.110:80 check
server BMCHELIXDWP2 10.19.0.131:80 check

backend srvs_smartit
balance source #roundrobin
hash-type consistent # optional
server BMCHELIXDWP1 10.19.0.110:8080 check
server BMCHELIXDWP2 10.19.0.131:8080 check

backend srvs_arserver
mode tcp
balance source #roundrobin
hash-type consistent # optional
server BMCHELIXARS1 10.19.0.109:33000 check
server BMCHELIXARS2 10.19.0.111:33000 check

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>