INTRODUCTION
Deploying a web server on the cloud doesnât have to be complicated, and AWS makes it even easier. In this beginner-friendly guide, Iâll walk you through how I installed NGINX on an Ubuntu-based EC2 instance, step by step. Ubuntu is a popular, beginner-friendly Linux operating system often used on servers. NGINX (pronounced as âengine-xâ) is a powerful, high-performance web server used to host websites and apps.
Before you begin, make sure you have the following in place: Make sure your AWS account is up and running. If you havenât set one up yet, no worries, Iâve broken it down step-by-step in a previous guide. Youâll also need Git Bash for this setup, so be sure to download it if you havenât already."
Alright, letâs dive in, shall we?
Open GiT BASH
Connect to the instance: ssh -i your-key.pem ubuntu@ip address

When prompted, type yes and press Enter.Upgrade the system and Install: to upgrade(sudo apt install nginx -y) and to install(sudo apt install nginx -y).

To start and Enable the NGINX: to Start(sudo systemctl start nginx) and to Enable(sudo systemctl enable nginx)

You can also check if NGINX is running and active.(sudo systemctl status nginx).
Go back to your instance dashboard and copy the IP address and paste it into your web browser. You should see the default NGINX welcome page!

I went further to customize my page with sudo nano /var/www/html/index.nginx-debian.html

:
đ Thatâs it! Youâve launched an Ubuntu EC2 instance, connected via SSH, installed NGINX, and served your first web page from the cloud, a solid first step into cloud computing and DevOps.
Until next time, stay curious.









Top comments (0)