linux_wiki:load_balancing_haproxy_and_keepalived

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
linux_wiki:load_balancing_haproxy_and_keepalived [2018/04/09 00:14]
billdozor [Reboots]
linux_wiki:load_balancing_haproxy_and_keepalived [2018/04/09 00:19]
billdozor [HA-Proxy]
Line 89: Line 89:
  
 Official Site: http://www.haproxy.org/ Official Site: http://www.haproxy.org/
 +
 +==== Main Config ====
  
   * Configure HA-Proxy (/etc/haproxy/haproxy.cfg)   * Configure HA-Proxy (/etc/haproxy/haproxy.cfg)
     * Remove all example frontend and backend config sections (leave default section)     * Remove all example frontend and backend config sections (leave default section)
 +    * Add a section for the HAProxy Stats page<code bash>#---------------------------------------------------------------------
 +# HAProxy Stats
 +#---------------------------------------------------------------------
 +listen stats
 +  # SSL Mode and Cert
 +  bind *:9000 ssl crt /etc/pki/tls/mycertfiles.pem
 +  mode http
 +
 +  # Enable Stats and Hide Version
 +  stats enable
 +  stats hide-version
 +
 +  # Authentication realm. This can be set to anything. Escape space characters with a backslash.
 +  stats realm HAProxy\ Statistics
 +
 +  # The virtual URL to access the stats page
 +  stats uri /haproxy_stats
 +
 +  # The user/pass you want to use. Change this password!
 +  stats auth admin:adminpassword</code>
 +  * The pem certificate file is a concatenation of the SSL key, cert, and certificate authority. Example<code bash>cat mykey.key mycert.crt myCAs.crt >> mycertfiles.pem</code>
 +
 +==== Frontend/Backend Configs ====
 +
     * Create new directory to hold frontend/backend config files<code bash>mkdir /etc/haproxy/config.d</code>     * Create new directory to hold frontend/backend config files<code bash>mkdir /etc/haproxy/config.d</code>
     * Create new frontend/backend config files (Example: /etc/haproxy/config.d/http.cfg)     * Create new frontend/backend config files (Example: /etc/haproxy/config.d/http.cfg)
  • linux_wiki/load_balancing_haproxy_and_keepalived.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)