Exemple Backend avec différentes fonctions
Default Backend :
backend default
mode http
server apache01 10.5.12.6:80 check
Backend avec authentification HTTP :
backend couchpotato
mode http
acl AuthOkay_UsersAuth http_auth(CouchPotato)
http-request auth realm 'CouchPotato. Go out.' if !AuthOkay_UsersAuth
server illegaldl 10.5.12.7:5050 check
/!\ : Déclarer sous le log format cette section qui contient les listes d'utilisateurs :
####################
# Authentification #
####################
userlist CouchPotato
user toto insecure-password TITITATA
user tititi insecure-password P@SSW0RD
Backend avec authentification HTTP + Whitelist IPs :
backend couchpotato
mode http
acl whitelist_home src 1.1.1.1/32
acl whitelist_sus src 12.12.12.12/32
acl whitelist_ora src 92.16.112.91/32
acl whitelist_lcl src 192.168.1.0/24
acl restricted_page path_beg /plugins/fusioninventory
acl auth_ok http_auth(UsersAuth)
http-request auth if restricted_page !auth_ok !whitelist_home !whitelist_sus !whitelist_ora !whitelist_lcl
server sus-apache01 10.6.42.4:80 check
Backend avec Whitelist IP access :
backend couchpotato
mode http
acl whitelist_home src 1.1.1.1/32
acl whitelist_sus src 12.12.12.12/32
acl whitelist_ora src 92.16.112.91/32
acl whitelist_lcl src 192.168.1.0/24
tcp-request content reject if !whitelist_home !whitelist_sus !whitelist_ora !whitelist_lcl
server sus-apache01 10.6.42.4:80 check