As part of my DevOps journey, I set up an NGINX web server on a Google Cloud Ubuntu VM. Here's a quick rundown of the process:
Steps Taken
Creating the VM:
I launched a VM on Google Cloud Platform (GCP), naming it devops-stage-0. I chose the e2-micro machine type and Ubuntu 22.04 LTS as the operating system.
Server Setup:
After launching the VM, I connected via SSH and updated the server with:
sudo apt update && sudo apt upgrade -y
Installing NGINX:
I installed NGINX using:
sudo apt install nginx -y
Then, I started and enabled the NGINX service:
sudo systemctl start nginx
sudo systemctl enable nginx
Custom HTML Page:
I created a custom HTML page to display the message: "Welcome to DevOps Stage 0 - Salako Abdullah/salakonba".
Firewall Configuration:
To allow HTTP traffic, I configured the firewall:
sudo ufw allow 'Nginx HTTP'
sudo ufw enable
Testing the Setup:
After completing the configuration, I accessed the server’s External IP in the browser. The custom HTML page loaded successfully, displaying my welcome message.
Challenges and Solutions
The main challenge was ensuring the firewall allowed HTTP traffic. Once I adjusted the rules, the page loaded correctly. Working in the cloud environment also required me to adapt, but the process was straightforward with the help of GCP’s documentation.
Learning and Growth
This task has solidified my understanding of cloud infrastructure and web server management. It was a valuable experience that boosted my confidence in working with cloud platforms and NGINX.
Reference Links
Top comments (0)