You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

certbot.lin.sh 617B

1234567891011121314151617181920
  1. #!/bin/bash
  2. # Update package list
  3. echo "Updating package list..."
  4. sudo apt update -y
  5. # Install Certbot and the Nginx plugin
  6. echo "Installing Certbot and Nginx plugin..."
  7. sudo apt install -y certbot python3-certbot-nginx
  8. # Obtain SSL certificate for your domain
  9. echo "Obtaining SSL certificate..."
  10. sudo certbot --nginx -d ec2-13-201-225-130.ap-south-1.compute.amazonaws.com
  11. # Certbot automatic renewal (this is done by default)
  12. echo "Setting up automatic renewal for SSL certificate..."
  13. sudo systemctl enable certbot.timer
  14. # Final message
  15. echo "SSL setup complete. Your site should now be accessible over HTTPS."