PHP code example of shift31 / haproxy-cluster-control
1. Go to this page and download the library: Download shift31/haproxy-cluster-control library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shift31 / haproxy-cluster-control example snippets
return [
'environments' => [
'qa' => [
'servers' => [
// FQDN of each haproxy server
],
'port' => 8000,
'baseUrl' => '/stats',
'username' => 'username',
'password' => 'password'
]
],
'backend_nickname_map' => [
// optional, association of nicknames to backend names (as set in the haproxy config)
// i.e. 'www' => 'www_http'
]
];