Let’s assume the following setup where we have a HAproxy frontend accepting incoming requests for an app in port 80, and then forwarding those requests to the application’s backend servers (nginx web instances). This would be useful, for example when you would like to upgrade the version of nginx servers hosting your web application’s code to the latest version of nginx with zero downtime ! Here is the minimal haproxy.cfg configuration file we are going to use for this guide:
Install CertBot Installing certbot in Ubuntu is pretty straight forward:
apt-get install certbot Generate certificate Based on the type of webserver you are using, you need to pass a different parameter to the certbot in order for it to properly configure your virtual host.
In the case of nginx , it’s as simple as: