This project documents the end-to-end process of deploying a personal portfolio website on AWS EC2, configuring Nginx as a web server, connecting a custom domain name, and securing the site with HTTPS using Let’s Encrypt (Certbot).
The goal of this project is to demonstrate practical cloud, Linux, networking, and web server administration skills.
- Cloud Provider: Amazon Web Services (AWS)
- Compute: EC2 (Amazon Linux)
- Web Server: Nginx
- Domain Registrar: Namecheap
- DNS: Registrar DNS
- SSL/TLS: Let’s Encrypt via Certbot
- Protocol Support: IPv4 only
1.1 Launch EC2
EC2 → Launch InstanceAmazon Linux 2023 as the AMIt2.micro1.2 Key Pair & Network
.pem)1.3 Launch and Connect
ssh -i mykey.pem ec2-user@<public-ip>
sudo dnf update -y
sudo dnf install nginx -y
sudo systemctl start nginx
sudo systemctl enable nginx
Verify the default Nginx page by navigating to http://<EC2-Public-IP>.
Purchased frederickatasina.com from a domain registrar and opted to manage DNS manually.
Created the following DNS A records:
| Type | Host | Value | TTL |
|---|---|---|---|
| A | @ | EC2 Public IPv4 | Auto |
| A | www | EC2 Public IPv4 | Auto |
Wait for DNS propagation (5–30 minutes).
sudo mkdir -p /var/www/frederickatasina.com/html
sudo chown -R ec2-user:ec2-user /var/www/frederickatasina.com
nano /var/www/frederickatasina.com/html/index.html
sudo nano /etc/nginx/conf.d/frederickatasina.com.conf
Add the following configuration:
server {
listen 80;
listen [::]:80;
server_name frederickatasina.com www.frederickatasina.com;
root /var/www/frederickatasina.com/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
sudo nginx -t
sudo systemctl reload nginx
sudo dnf install certbot python3-certbot-nginx -y
sudo certbot --nginx -d frederickatasina.com -d www.frederickatasina.com
Follow prompts to complete the process.
In this project, I secured the server by:
These steps strengthened the server’s security and ensured a safe browsing experience for users.
Through this project, I gained practical experience with:
This project strengthened my skills in cloud infrastructure, web server management, and security best practices.