Frederick Atinkine Atasina

Project Overview

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.

Architecture Summary

- 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

Step 1: Create an AWS EC2 Instance

1.1 Launch EC2

1.2 Key Pair & Network

1.3 Launch and Connect

ssh -i mykey.pem ec2-user@<public-ip>

Step 2: Update System and Install Nginx

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>.

Step 3: Buy a Domain Name

Purchased frederickatasina.com from a domain registrar and opted to manage DNS manually.

Step 4: Configure DNS Records

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).

Step 5: Create Website Files

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

Step 6: Configure Nginx Server Block

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

Step 7: Install Certbot (Let’s Encrypt)

sudo dnf install certbot python3-certbot-nginx -y

Step 8: Obtain and Install SSL Certificate

sudo certbot --nginx -d frederickatasina.com -d www.frederickatasina.com

Follow prompts to complete the process.

Security

In this project, I secured the server by:

These steps strengthened the server’s security and ensured a safe browsing experience for users.

Lessons Learned

Through this project, I gained practical experience with:

This project strengthened my skills in cloud infrastructure, web server management, and security best practices.

Contact

Email: frederickatasinaatinkine@gmail.com