Multiple WebSites on servers (ports)


#1

Hi,

i have following scenario in my environment:

2 Web Servers each hosts 6 web applications hosted on diferent ports.

Servers:
domain : 80
domain : 81
domain : 82
domain : 83
domain : 443 (ssl)
www.domain.com : 444 (ssl)

there is a plan to have same port for all websites and change their URL. But not now it will be in near future.

For balancing I would like to have one front end config (1 IP with multiple ports)

How to configure this?

FE and BE config sample for multiple ports with health check. Also two of them are in SSL.

Thanks a lot

Jan


#2

Hi,

I made those rules:

frontend TST_APP_Services

bind 192.168.230.34:80
bind 192.168.230.34:81
bind 192.168.230.34:82
bind 192.168.230.34:83
bind 192.168.230.34:85
bind 192.168.230.34:86
bind 192.168.230.34:89
bind 192.168.230.34:442 ssl crt /cert/wild.pem
bind 192.168.230.34:443 ssl crt /cert/wild.pem

option http-server-close
option forwardfor
reqadd X-Forwarded-Proto:\ https
reqadd X-Forwarded-Port:\ 443
rspadd Strict-Transport-Security:\ max-age=15768000

acl used_port80 dst_port 80
acl used_port81 dst_port 81
acl used_port82 dst_port 82
acl used_port83 dst_port 83
acl used_port85 dst_port 85
acl used_port86 dst_port 86
acl used_port89 dst_port 89
acl used_port443 dst_port 443
acl used_port442 dst_port 442

backend TST_APP_PORT80
mode http
balance source
option forwardfor
option http-tunnel
option redispatch
option httplog
option httpchk
http-check expect rstatus (2…|3…|401)
default-server inter 3s fall 3 rise 2
server TST-APP-A01 10.50.10.182:80 check cookie s1
server TST-APP-A02 10.50.10.186:80 check cookie s2

For now it looks like it works. But is that good way how accomplish this?

Caspi