<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Victor Eze</title>
    <description>The latest articles on Forem by Victor Eze (@victor_eze_8173729864a01b).</description>
    <link>https://forem.com/victor_eze_8173729864a01b</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2801849%2F6705abc4-4f87-4e42-8335-40cca454edca.png</url>
      <title>Forem: Victor Eze</title>
      <link>https://forem.com/victor_eze_8173729864a01b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/victor_eze_8173729864a01b"/>
    <language>en</language>
    <item>
      <title>Number Classification API Development. HNG task 1</title>
      <dc:creator>Victor Eze</dc:creator>
      <pubDate>Thu, 06 Feb 2025 12:31:52 +0000</pubDate>
      <link>https://forem.com/victor_eze_8173729864a01b/number-classification-api-development-hng-task-1-3gd2</link>
      <guid>https://forem.com/victor_eze_8173729864a01b/number-classification-api-development-hng-task-1-3gd2</guid>
      <description>&lt;h2&gt;
  
  
  SYNOPSIS
&lt;/h2&gt;

&lt;p&gt;This project addresses the need for a simple and readily available way to access information about the mathematical properties of numbers.  The Number Classification API provides this functionality, taking a number as input and returning a structured JSON response with key properties and a fun fact. This project allows you to touch upon all stages of the SDLC, from development and testing to deployment and monitoring.  This end-to-end experience is invaluable for understanding how different DevOps practices integrate.&lt;/p&gt;

&lt;h2&gt;
  
  
  FEATURES
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Number input:&lt;/strong&gt; Accepts integer numbers as input&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Mathematical Property Calculation:&lt;/strong&gt; Determines whether a number is prime, odd, armstrong, perfect, digit sum etc.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Fun Fact Retrieval:&lt;/strong&gt; Fetches a fun fact about the number from an external API&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;JSON Output:&lt;/strong&gt; Returns all the calculated properties and the fun fact in a structured JSON format.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CORS Handling:&lt;/strong&gt; Implements Cross-Origin Resource Sharing (CORS) to allow access from different web domains&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deployment:&lt;/strong&gt;  Must be deployed to a publicly accessible endpoint.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Development tools&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;VS code ( open source editor)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Python (Lambda function)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;AWS Lambda (Serverless execution)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;API Gateway (Public API exposure)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;GitHub (Version control and CI/CD)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Design Diagram&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7sxpz7orydzj4vbqtej4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7sxpz7orydzj4vbqtej4.jpg" alt="Image description" width="800" height="334"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Structure&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Number-Classification-API/
│-- lambda_function.py  # Main Lambda function
│-- requirements.txt    # Python dependencies
│-- README.md           # Project documentation
│-- .gitignore          # Git ignore file
└── app.py              # Python scripts
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Setting up&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Create a folder for your project.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open the folder on your VScode editor.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;create app.py and lambda-function.py files.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Open your github account and create a repository (Number-Classifier-API).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Clone the repository&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/Victor-divine/Number-Classification-API.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;- Change your directory to the project folder and then to your repository on your terminal.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd HNG-Task
cd Number-Classification-API
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Create and Activate Virtual Environment&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m venv venv
Source venv\Scripts\activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Dependencies Installation&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install flask flask-cors
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0za8n3uwpjizldn7ngdq.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0za8n3uwpjizldn7ngdq.PNG" alt="Image description" width="800" height="448"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create the Flask App&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Put the app code to the app.py file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from flask import Flask, request, jsonify
from flask_cors import CORS

app = Flask(__name__)
CORS(app)  # Enable CORS

# Function to check if a number is prime
def is_prime(n):
    if n &amp;lt; 2:
        return False
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            return False
    return True

# Function to check if a number is a perfect number
def is_perfect(n):
    return n == sum(i for i in range(1, n) if n % i == 0)

# Function to check if a number is an Armstrong number
def is_armstrong(n):
    digits = [int(d) for d in str(n)]
    power = len(digits)
    return n == sum(d**power for d in digits)

# Function to generate fun facts
def get_fun_fact(n):
    if is_armstrong(n):
        return f"{n} is an Armstrong number because {' + '.join([f'{d}^{len(str(n))}' for d in str(n)])} = {n}"
    elif is_prime(n):
        return f"{n} is a prime number because it has only two divisors: 1 and itself."
    elif is_perfect(n):
        return f"{n} is a perfect number because the sum of its proper divisors equals the number."
    else:
        return f"{n} is just an interesting number!"

@app.route('/api/classify-number', methods=['GET'])
def classify_number():
    num = request.args.get('number')

    if not num or not num.isdigit():
        return jsonify({"number": num, "error": True}), 400

    num = int(num)

    response = {
        "number": num,
        "is_prime": is_prime(num),
        "is_perfect": is_perfect(num),
        "properties": ["odd" if num % 2 else "even"],
        "digit_sum": sum(int(d) for d in str(num)),
        "fun_fact": get_fun_fact(num)
    }

    if is_armstrong(num):
        response["properties"].append("armstrong")

    return jsonify(response)

if __name__ == '__main__':
    app.run(debug=True)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Run the API Locally&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python app.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Open your browser to test the API:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://127.0.0.1:5000/api/classify-number?number=153
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;JSON Response&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fsb1hqaorwtcdp9r5oo.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1fsb1hqaorwtcdp9r5oo.PNG" alt="Image description" width="800" height="161"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deploy the API&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import json

def is_prime(n):
    if n &amp;lt; 2 or n % 1 != 0:  # Exclude negative and non-integer values
        return False
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            return False
    return True

def is_perfect(n):
    if n &amp;lt;= 0 or n % 1 != 0:  # Exclude zero and non-integers
        return False
    return n == sum(i for i in range(1, int(n)) if n % i == 0)

def is_armstrong(n):
    if n % 1 != 0:  # Only consider integers
        return False
    digits = [int(d) for d in str(abs(int(n))) if d.isdigit()]
    power = len(digits)
    return n == sum(d**power for d in digits)

def get_fun_fact(n):
    if is_armstrong(n):
        return f"{n} is an Armstrong number because {' + '.join([f'{d}^{len(str(abs(int(n))))}' for d in str(abs(int(n))) if d.isdigit()])} = {n}"
    elif is_prime(n):
        return f"{n} is a prime number because it has only two divisors: 1 and itself."
    elif is_perfect(n):
        return f"{n} is a perfect number because the sum of its proper divisors equals the number."
    else:
        return f"{n} is just an interesting number!"

def lambda_handler(event, context):
    try:
        query_params = event.get("queryStringParameters", {})
        num = query_params.get("number", "")

        try:
            num = float(num)  # Convert input to float
        except ValueError:
            return {
                "statusCode": 400,
                "headers": {
                    "Content-Type": "application/json",
                    "Access-Control-Allow-Origin": "*"
                },
                "body": json.dumps({"number": num, "error": "Invalid number"})
            }

        response = {
            "number": num,
            "is_prime": is_prime(num),
            "is_perfect": is_perfect(num),
            "properties": [],
            "digit_sum": sum(int(d) for d in str(abs(int(num))) if d.isdigit()) if num % 1 == 0 else None,
            "fun_fact": get_fun_fact(num)
        }

        # Assign correct properties
        if num % 1 == 0:  # Only process whole numbers
            response["properties"].append("odd" if int(num) % 2 else "even")
            if is_armstrong(num):
                response["properties"].append("armstrong")

        return {
            "statusCode": 200,
            "headers": {
                "Content-Type": "application/json",
                "Access-Control-Allow-Origin": "*"
            },
            "body": json.dumps(response)
        }

    except Exception as e:
        return {
            "statusCode": 500,
            "headers": {
                "Content-Type": "application/json",
                "Access-Control-Allow-Origin": "*"
            },
            "body": json.dumps({"error": str(e)})
        }


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Package and Deploy to AWS Lambda&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zip function.zip lambda_function.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Create an API gateway&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Choose HTTP API.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add Integration → Choose Lambda Function.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select your Lambda function (NumberClassifierAPI).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enter /api/classify-number as the route.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose GET as the method.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then Deploy.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcgquzey9795wet1j4u8p.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcgquzey9795wet1j4u8p.PNG" alt="Image description" width="800" height="216"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Test your API&lt;/strong&gt;&lt;br&gt;
Once deployed, copy the API Gateway URL and test it in your browser&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://qn5p0npw11.execute-api.us-east-1.amazonaws.com/Test/api/classify-number?number=371
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;JSON Output.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn0o7ayzas5ntj6e14qj0.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn0o7ayzas5ntj6e14qj0.PNG" alt="Image description" width="800" height="236"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enable CORS in API Gateway.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;u&gt;Significance of the project.&lt;/u&gt;
&lt;/h2&gt;

&lt;p&gt;The project, though simple, offers a sandbox for practicing and demonstrating a wide range of DevOps skills. Building, deploying, and managing a real (small) application provides practical experience highly valued in the field.  Incorporating advanced practices makes the project even more impressive and valuable.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>python</category>
      <category>aws</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Configuring NGINX Web Server on Amazon EC2 Instance using Ubuntu server. My Stage 0 DevOps Task</title>
      <dc:creator>Victor Eze</dc:creator>
      <pubDate>Sun, 02 Feb 2025 23:59:01 +0000</pubDate>
      <link>https://forem.com/victor_eze_8173729864a01b/configuring-nginx-web-server-on-amazon-ec2-instance-using-ubuntu-server-my-stage-0-devops-task-2gah</link>
      <guid>https://forem.com/victor_eze_8173729864a01b/configuring-nginx-web-server-on-amazon-ec2-instance-using-ubuntu-server-my-stage-0-devops-task-2gah</guid>
      <description>&lt;p&gt;&lt;strong&gt;INTRODUCTION&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Handling millions of request by a website without crash can be attributed to the power of a well-configured web server and NGINX is a popular choice for its speed and efficiency. This post provides a step-by-step guide to configuring the NGINX web server on an Amazon EC2 instance using Ubuntu Server. I'll show you how to install and configure NGINX on an Amazon EC2 instance running Ubuntu Server. This is my first project at HNG DevOps internship training.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Setup&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Launch an Amazon EC2 Instance.&lt;br&gt;
*&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Instance name&lt;/strong&gt;:  Nginx instance&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AMI:&lt;/strong&gt; Ubuntu server 24.04&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instance type:&lt;/strong&gt; t2 micro&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Key pair:&lt;/strong&gt; nginx-key&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security group:&lt;/strong&gt; Allow SHH traffic form anywhere&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;port: Port 80 (HTTP):&lt;/strong&gt; This allows access to your web server over HTTP.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9tqo2fzby5xwc7xgdgo.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq9tqo2fzby5xwc7xgdgo.PNG" alt="Image description" width="800" height="183"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect to the EC2 instance:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Connect this by selecting on your instance, click connect and use Ec2 direct connect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update the package list:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbe7h6mf4fjkv9a37j5gh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbe7h6mf4fjkv9a37j5gh.PNG" alt="Image description" width="800" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Installation of Nginx:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install nginx -y

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F095wucjsswn3pmruqtwt.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F095wucjsswn3pmruqtwt.PNG" alt="Image description" width="800" height="212"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Start and enable nginx to run on boot:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl start nginx 
sudo systemctl enable nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4pejxqk4zs63wkk7chjw.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4pejxqk4zs63wkk7chjw.PNG" alt="Image description" width="800" height="56"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;*&lt;em&gt;Configure the html page:&lt;br&gt;
*&lt;/em&gt;&lt;/em&gt;&lt;br&gt;
First open the index.html file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo nano /var/www/html/index.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Then,&lt;/strong&gt;&lt;br&gt;
Add the html content&lt;br&gt;
Save and exist&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa2oqpawuvjrr71reutuz.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa2oqpawuvjrr71reutuz.PNG" alt="Image description" width="800" height="130"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Restart the nginx server to effect the change:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl restart nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Verify if the nginx web server is running:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl status nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fufuf0f5nxut2932p5iqg.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fufuf0f5nxut2932p5iqg.PNG" alt="Image description" width="800" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Open a web browser and verify:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://your-server-ip
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjlj525bwo2sixg2nix3z.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fjlj525bwo2sixg2nix3z.PNG" alt="Image description" width="800" height="41"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6p9ufdgca3i4b6hfk10b.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6p9ufdgca3i4b6hfk10b.PNG" alt="Image description" width="800" height="52"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;_&lt;strong&gt;CHALLENGES FACED WORKING ON THIS PROJECT.&lt;br&gt;
_&lt;/strong&gt;&lt;br&gt;
While creating my instance I encountered issues choosing my CIDR block as it keeps giving error message that its overlapping so I had to choose a different CIDR block different from what I had before.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CONCLUSION:&lt;/strong&gt;&lt;br&gt;
By following these steps, you now have a fully functional NGINX web server running on your EC2 instance. This is a fundamental skill for any developer or DevOps engineer, enabling you to host websites, APIs, and other web applications. NGINX's performance and reliability will provide a solid foundation for your projects.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;REFERENCES:&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://hng.tech/hire/devops-engineers" rel="noopener noreferrer"&gt;DevOps Engineer&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hng.tech/hire/cloud-engineers" rel="noopener noreferrer"&gt;Cloud Engineers.&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hng.tech/hire/infrastructure-engineers" rel="noopener noreferrer"&gt;Infrastructure Engineers.&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hng.tech/hire/aws-solutions-architects" rel="noopener noreferrer"&gt;AWS Solutions Architects.&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hng.tech/hire/azure-devops-engineers" rel="noopener noreferrer"&gt;Azure DevOps Engineer.&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hng.tech/hire/google-cloud-engineers" rel="noopener noreferrer"&gt;Google Cloud Engineer.&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hng.tech/hire/ci-cd-pipeline-engineers" rel="noopener noreferrer"&gt;CI/CD Pipeline Engineers.&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>devops</category>
      <category>html</category>
      <category>aws</category>
      <category>nginx</category>
    </item>
  </channel>
</rss>
