Guest User

Untitled

a guest
Oct 20th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.99 KB | None | 0 0
  1. frontend haproxy_in
  2. bind *:80
  3. 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
  4. mode http
  5. # Define Path For LetsEncrypt.........................
  6. acl is_letsencrypt path_beg -i /.well-known/acme-challenge/
  7. use_backend letsencrypt if is_letsencrypt
  8. # Define hosts........................................
  9. acl is_moodle hdr_dom(host) -i mdl.ief.tishreen.edu.sy
  10. acl is_lib hdr_dom(host) -i lib.ief.tishreen.edu.sy
  11. acl is_mail hdr_dom(host) -i mail.ief.tishreen.edu.sy
  12. acl is_vpn hdr_dom(host) -i vpn.ief.tishreen.edu.sy
  13. acl is_www hdr_dom(host) -i www.ief.tishreen.edu.sy
  14. # Direct hosts to backend..............................
  15. use_backend moodle if is_moodle
  16. use_backend lib if is_lib
  17. use_backend vpn if is_vpn
  18. use_backend www if is_www
  19. default_backend base
  20. # Redirect port 80 t0 443 except lets encrypt............
  21. redirect scheme https code 301 if !{ ssl_fc } !is_letsencrypt
  22. ### exchange owa frontend####
  23. frontend exchange-server
  24. bind *:80
  25. bind *:443
  26. mode tcp
  27. acl is_mail hdr_dom(host) -i mail.ief.tishreen.edu.sy
  28. use_backend mail if is_mail
  29.  
  30. default_backend base
  31.  
  32. backend mail
  33. balance roundrobin
  34. mode tcp
  35. server vm3 172.17.16.22:443 check
  36. ######################
  37. # #
  38. # Backends #
  39. # #
  40. ######################
  41. backend letsencrypt
  42. server letsencrypt 127.0.0.1:8888
  43. backend moodle
  44. balance roundrobin
  45. mode http
  46. server vm1 172.17.16.20:80 check
  47.  
  48. backend lib
  49. balance roundrobin
  50. mode http
  51. server vm2 172.17.16.18:80/akasia check
  52.  
  53.  
  54. backend vpn
  55. balance roundrobin
  56. mode http
  57. server vm4 172.17.16.35:1194 check
  58.  
  59. backend www
  60. balance roundrobin
  61. mode http
  62. server vm5 172.17.16.25:80 check
  63.  
  64. backend base
  65. balance roundrobin
  66. mode http
  67. server vmtest 172.17.16.25:80 check
  68.  
  69.  
  70. ###############################
Add Comment
Please, Sign In to add comment