![]() docker-letsencrypt-nginx-proxy-companion inspects containers’ metadata and tries to acquire certificates as needed (if successful then saving them in a volume shared with the host and the Nginx container).Build and create containers for the two sites located in sample-websites.Download the required images from Docker Hub ( nginx, docker-gen, docker-letsencrypt-nginx-proxy-companion).In volumes/config/sample-website/config.js change apiUrl to your API endpoint as set up in the previous point in docker-compose.yml.Change LETSENCRYPT_EMAIL entries to the email address you want to be associated with the certificates.Change the VIRTUAL_HOST and LETSENCRYPT_HOST entries from and to your domains.Clone the repository on the server pointed to by your domain. ![]() access to (sub)domain(s) pointing to a publicly accessible server (required for TLS).Some of the configuration is derived from with some simplifications and updates to work with current nginx.tmpl from nginx-proxy and docker-compose v2 files. New sites can be added on the fly by just modifying docker-compose.yml and then running docker-compose up as the main Nginx config is automatically updated and certificates (if needed) are automatically acquired. This post shows how to set up multiple websites running behind a dockerized Nginx reverse proxy and served via HTTPS using free Let’s Encrypt certificates.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |