Skip to main content
📝 Cloud & DevOps (AWS)

How to Install SSL Certificate on Amazon Linux 2023 with Apache | Step-by-Step Guide

Securing your website with SSL (Secure Sockets Layer) is critical for protecting user data, boosting SEO rankings, and improving user trust. This guid...

2 min

Tiempo de lectura

298

Palabras

Mar 23, 2025

Publicado

Engr Mejba Ahmed

Escrito por

Engr Mejba Ahmed

Compartir Artículo

How to Install SSL Certificate on Amazon Linux 2023 with Apache | Step-by-Step Guide

Securing your website with SSL (Secure Sockets Layer) is critical for protecting user data, boosting SEO rankings, and improving user trust. This guide will walk you through the complete setup process of installing an SSL certificate on an Amazon Linux 2023 instance running Apache.

What You'll Need:

  • Amazon Linux 2023 EC2 instance
  • Domain name pointed to your EC2 instance
  • AWS CLI installed on your local machine
  • SSH access to your EC2 instance

Step 1: Connect to Your EC2 Instance

Log into your EC2 instance via SSH:

ssh -i "your-key.pem" ec2-user@your-ec2-instance-public-ip

Step 2: Update Your Server and Install Apache

sudo dnf update -y
sudo dnf install httpd -y
sudo systemctl start httpd
sudo systemctl enable httpd

Verify Apache is running by accessing your EC2 instance IP in your browser:

http://your-ec2-instance-public-ip

Step 3: Install Certbot for SSL

Certbot simplifies SSL certificate installation and renewal:

sudo dnf install epel-release -y
sudo dnf install certbot python3-certbot-apache -y

Step 4: Obtain and Install SSL Certificate

Replace example.com with your actual domain:

sudo certbot --apache -d example.com -d www.example.com

Follow the interactive prompts to complete the installation.


Step 5: Verify Your SSL Certificate Installation

Visit your website using HTTPS:

https://example.com

A padlock icon should appear, indicating the SSL certificate is successfully installed.


Step 6: Automate SSL Certificate Renewal

Certbot can renew certificates automatically:

Test auto-renewal:

sudo certbot renew --dry-run

If successful, Certbot will automatically renew your certificates before they expire.


If you are using firewalld, allow HTTP and HTTPS traffic:

sudo firewall-cmd --add-service=http --permanent
sudo firewall-cmd --add-service=https --permanent
sudo firewall-cmd --reload

Conclusion

Congratulations! You've successfully installed an SSL certificate on your Amazon Linux 2023 server running Apache. Your website is now secure, trusted by browsers, and better positioned for search engine optimization.

Coffee cup

¿Te gustó este artículo?

Tu apoyo me ayuda a crear más contenido técnico detallado, herramientas de código abierto y recursos gratuitos para la comunidad de desarrolladores.

Temas Relacionados

Engr Mejba Ahmed

Sobre el Autor

Engr Mejba Ahmed

Engr. Mejba Ahmed builds AI-powered applications and secure cloud systems for businesses worldwide. With 10+ years shipping production software in Laravel, Python, and AWS, he's helped companies automate workflows, reduce infrastructure costs, and scale without security headaches. He writes about practical AI integration, cloud architecture, and developer productivity.

Discussion

Comments

0

No comments yet

Be the first to share your thoughts

Leave a Comment

Your email won't be published

12  +  8  =  ?

Seguir Aprendiendo

Artículos Relacionados

Ver Todos

Comments

Leave a Comment

Comments are moderated before appearing.

Learning Resources

Expand Your Knowledge

Accelerate your growth with structured courses, verified certificates, interactive flashcards, and production-ready AI agent skills.

Sample Certificate of Completion

Sample certificate — complete any course to earn yours