Objective
Web server configurations by serving a custom HTML page.
Prerequisites
AWS cloud account
Task Breakdown
- Setting Up the Ubuntu Server
Launch an Ubuntu instance. After setting up the instance, allow traffic on port 80 and Connect to it using SSH
ssh ubuntu@<your-server-ip>
- Installing NGINX
NGINX is a lightweight and efficient web server. To install it on Ubuntu, Run the following command
sudo apt update
sudo apt install nginx -y
Once installed, Verify that the service is running:
sudo systemctl status nginx
- Configuring NGINX to Serve a Custom Page
Replace the default index page with my custom HTML content.
First, edit the /var/www/html/index.html file
:
sudo nano /var/www/html/index.html
Replaced its contents with the following message:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DevOps Stage 0</title>
</head>
<body>
<h1>Welcome to DevOps Stage 0 - [Your Name]/[SlackName]</h1>
</body>
</html>
After saving the file (Ctrl + X, then Y, and Enter)
Restart NGINX:
sudo systemctl restart nginx
To confirm everything worked correctly, Access the public IP in a browser:
http://<your-server-ip>/
If the custom page displayed the required message, the setup is successful.
Key Takeaways and Professional Growth
Completing this task reinforced my foundational DevOps skills, including:
- Server setup and management
- Installing and configuring a web server
- Managing firewall rules
- Understanding basic web server configurations is essential for DevOps and Cloud Engineers, as they often manage infrastructure and deployments in cloud environments.
Conclusion
Setting up and configuring NGINX was an insightful experience working with Linux-based web servers. This task is part of my DevOps internship journey at HNG, preparing me for more complex automation and cloud infrastructure tasks.
If you’re looking for DevOps/Cloud Engineers, check out these sites:
• DevOps Engineers - https://hng.tech/hire/devops-engineers
• Cloud Engineers - https://hng.tech/hire/cloud-engineers
• Site Reliability Engineers - https://hng.tech/hire/site-reliability-engineers
• Platform Engineers - https://hng.tech/hire/platform-engineers
• AWS Solutions Architects - https://hng.tech/hire/aws-solutions-architects
• Azure DevOps Engineers - https://hng.tech/hire/azure-devops-engineers
• Google Cloud Engineers - https://hng.tech/hire/google-cloud-engineers
Top comments (0)