1234567891011121314151617181920 |
- #!/bin/bash
-
-
- echo "Updating package list..."
- sudo apt update -y
-
-
- echo "Installing Certbot and Nginx plugin..."
- sudo apt install -y certbot python3-certbot-nginx
-
-
- echo "Obtaining SSL certificate..."
- sudo certbot --nginx -d ec2-13-201-225-130.ap-south-1.compute.amazonaws.com
-
-
- echo "Setting up automatic renewal for SSL certificate..."
- sudo systemctl enable certbot.timer
-
-
- echo "SSL setup complete. Your site should now be accessible over HTTPS."
|