Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- frontend haproxy_in
- bind *:80
- bind *:443 ssl crt /etc/haproxy/certs/mdl.ief.tishreen.edu.sy.pem crt /etc/haproxy/certs/mail.ief.tishreen.edu.sy.pem crt /etc/haproxy/certs/lib.ief.tishreen.edu.sy.pem crt /etc/haproxy/certs/ief.tishreen.edu.sy.pem crt /etc/haproxy/certs/www.ief.tishreen.edu.sy.pem crt /etc/haproxy/certs/educloud.ief.tishreen.edu.sy.pem crt /etc/haproxy/certs/vpn.ief.tishreen.edu.sy.pem
- mode http
- # Define Path For LetsEncrypt.........................
- acl is_letsencrypt path_beg -i /.well-known/acme-challenge/
- use_backend letsencrypt if is_letsencrypt
- # Define hosts........................................
- acl is_moodle hdr_dom(host) -i mdl.ief.tishreen.edu.sy
- acl is_lib hdr_dom(host) -i lib.ief.tishreen.edu.sy
- acl is_mail hdr_dom(host) -i mail.ief.tishreen.edu.sy
- acl is_vpn hdr_dom(host) -i vpn.ief.tishreen.edu.sy
- acl is_www hdr_dom(host) -i www.ief.tishreen.edu.sy
- # Direct hosts to backend..............................
- use_backend moodle if is_moodle
- use_backend lib if is_lib
- use_backend vpn if is_vpn
- use_backend www if is_www
- default_backend base
- # Redirect port 80 t0 443 except lets encrypt............
- redirect scheme https code 301 if !{ ssl_fc } !is_letsencrypt
- ### exchange owa frontend####
- frontend exchange-server
- bind *:80
- bind *:443
- mode tcp
- acl is_mail hdr_dom(host) -i mail.ief.tishreen.edu.sy
- use_backend mail if is_mail
- default_backend base
- backend mail
- balance roundrobin
- mode tcp
- server vm3 172.17.16.22:443 check
- ######################
- # #
- # Backends #
- # #
- ######################
- backend letsencrypt
- server letsencrypt 127.0.0.1:8888
- backend moodle
- balance roundrobin
- mode http
- server vm1 172.17.16.20:80 check
- backend lib
- balance roundrobin
- mode http
- server vm2 172.17.16.18:80/akasia check
- backend vpn
- balance roundrobin
- mode http
- server vm4 172.17.16.35:1194 check
- backend www
- balance roundrobin
- mode http
- server vm5 172.17.16.25:80 check
- backend base
- balance roundrobin
- mode http
- server vmtest 172.17.16.25:80 check
- ###############################
Add Comment
Please, Sign In to add comment