As part of the HNG Internship, I was tasked with setting up and configuring NGINX on an Ubuntu server. The objective was to create a custom HTML page displaying a personalized message and serve it as the default page using NGINX. This task introduced key DevOps concepts, including web server setup, configuration management, and troubleshooting.
NGINX – Web server for hosting and serving content.
Ubuntu – The operating system used for deployment.
Bash (CLI) – For system updates, software installation, and configuration.
HTML – For creating a simple webpage served by NGINX.
SSH – For remote access and server management.
Server Preparation
Updated the system to ensure all packages were current:
sudo apt update && sudo apt upgrade -y
NGINX Installation
Installed NGINX and verified that it was running:
sudo apt install nginx -y
sudo systemctl status nginx
Custom HTML Page Creation
Created a personalized index.html file in /var/www/html/:
<h1>Welcome to DevOps Stage 0 - Jessica Okolocha/Jessie</h1>
NGINX Configuration Update
Edited the NGINX configuration file to serve the custom page:
sudo nano /etc/nginx/sites-available/default
Key configuration settings:
server {
listen 80;
server_name _;
root /var/www/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
Applying Changes & Testing
Restarted NGINX to apply the configuration:
sudo systemctl restart nginx
Verified the setup by visiting the server’s IP address in a browser.
Permission Issues: Used sudo to modify system files safely.
Configuration Errors: Carefully edited and validated the NGINX configuration file.
Service Restart Failures: Debugged using sudo systemctl status nginx to resolve misconfigurations.
This project strengthened my understanding of web server configuration, troubleshooting, and DevOps fundamentals. The experience also highlighted the importance of attention to detail, system security, and time management when working under tight deadlines.
NGINX – Web server setup and configuration
Ubuntu/Linux – Server management and troubleshooting
Bash Scripting – Command-line operations
HTML – Basic frontend web development
SSH – Remote server access and administration