HAProxy ALOHA Documentation 11.5

DNS

You can configure which DNS servers to query when HAProxy ALOHA needs to resolve a server's hostname. This is necessary, for example, when you want to specify a hostname instead of an IP address when defining a backend server. Also, features like Single Sign-on depend on resolving hostnames. Typically, these DNS servers will reside within the local network.

Changes affect the system's /etc/resolv.conf file.

  1. In the Services tab, click system setup setup_icon next to the system service.

    https://cdn.haproxy.com/documentation/aloha/11-5/assets/system-setup-844b4640a7db7a72ada3d494a5852149ad96bd31c7121c91461c2762d576dc91.png
  2. Use the dns_servers directive to specify the IP addresses of your DNS servers, where each IP address is separated by a space.

    service system
      dns_servers 192.158.0.10 192.168.0.11
  3. [Optional] Use the dns_domain directive to specify the search list, which is equivalent to setting a search directive in /etc/resolv.conf. This allows you to use a server's hostname in your configuration, rather than its fully qualified domain name.

    If you specify the DNS suffix example.com, you will only have to type app in your configuration, which will expand to app.example.com.

    service system
      dns_servers 192.158.0.10 192.168.0.11
      dns_domain example.com
  4. [Optional] Use the hostname directive to change the HAProxy ALOHA hostname.

    service system
      dns_servers 192.158.0.10 192.168.0.11
      dns_domain example.com
      hostname aloha1
  5. Reload reload_icon the system service.


Next up

Assign an IP Address