Introduction
NGINX is a web server, reverse proxy and load balancer used to server static content. The purpose of this task is to install and configure nginx on an Ubuntu server, which is the official stage 0 task of HNG 12 DevOps internship program
Setting up and configuration
- Setting up the Ubuntu server: I first instantiated an EC2 instance on AWS. After setting it up, I enabled SSH access to connect to it remotely
Steps Taken:
- Logged into my AWS Management Console.
- Created a new EC2 instance running Ubuntu.
- Configured security groups to allow SSH (port 22) and HTTP (port 80) access.
Downloaded the private key (.pem file) and connected to the instance using SSH.
Installing NGINX: Once inside the server, I installed NGINX using the following command:
bash
sudo apt update && sudo apt install -y nginx
Configuring NGINX to Serve a Web Page
By default, NGINX serves files from /var/www/html.
Challenges
- While setting up the EC2 instance: I had to do lots of research since it was my first time
- Using the Nano editor: For some reason, I couldn’t paste into the Nano editor. It took me some time to figure out the correct command.
Top comments (0)