This is a template for creating a web application with an SSL certificate
- Technologies: Nginx, Certbot, Docker
- [1] Run the following command in the terminal
mkdir frontend && mkdir certbot - [2] Move your frontend project to the frontend folder
- [3] In the nginx/nginx.conf file, replace your-url.net to your domain
- [4] In the nginx/nginx.conf file, add: ssl_certificate, ssl_certificate_key; to the comment
- [5] Run the following command in the terminal
docker compose -f nginx.yml up -d - [6] Run the following command in the terminal
docker compose -f certbot.yml run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ --dry-run -d your-url.net - [7] Run the following command in the terminal
docker compose -f certbot.yml run --rm certbot certonly --webroot --webroot-path /var/www/certbot/ -d your-url.net - [8] In the nginx/nginx.conf file, remove: ssl_certificate, ssl_certificate_key; from the comment
- [9] Run the following command in the terminal
docker compose -f nginx.yml restart
- Telegram: @live4code
- Email: steven.marelly@gmail.com