HAProxy Config
The configuration file is stored on the VM under /opt/ha-proxy-certbot/config/haproxy.cfg
- Become root to modify it.
- Open the file, modify and save it.
- Check the container ID
docker ps
- Restart container for the changes to take effect
docker restart <CONTAINER_id>
There are four essential sections to an HAProxy configuration file. They are global
, defaults
, frontend
, and backend
. These four sections define how the server as a whole performs, what your default settings are, and how client requests are received and routed to your backend servers.
Check here: https://www.haproxy.com/blog/the-four-essential-sections-of-an-haproxy-configuration#what-about-listen
Check if configuration file is valid
docker exec -it <CONTAINER_ID> haproxy -c -f /config/haproxy.cfg