<?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>DEV Community: Essa-h</title>
    <description>The latest articles on DEV Community by Essa-h (@essah).</description>
    <link>https://dev.to/essah</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%2F1153541%2F2d29873a-dd4e-45c6-8cc7-86f8a8cd25b0.jpeg</url>
      <title>DEV Community: Essa-h</title>
      <link>https://dev.to/essah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/essah"/>
    <language>en</language>
    <item>
      <title>Configuring NGINX web server on amazon EC2</title>
      <dc:creator>Essa-h</dc:creator>
      <pubDate>Fri, 31 Jan 2025 13:15:08 +0000</pubDate>
      <link>https://dev.to/essah/configuring-nginx-web-server-on-amazon-ec2-3ill</link>
      <guid>https://dev.to/essah/configuring-nginx-web-server-on-amazon-ec2-3ill</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hello everyone. Being part of the HNG DevOps internship program, I was tasked with configuring NGINX on a fresh Ubuntu server to serve a custom HTML page. I began working on this project on January 31st, 2025, and was able to complete it after several trials.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Objective&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The objective of this blog post is to illustrate how to set up and configure a basic web server on Ubuntu. Here's my approach to the task.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configuring an EC2 instance&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I created an Amazon EC2 Instance on AWS. I chose AWS Cloud Services because I was able to use the basic support plan which was free. I used the following options:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ubuntu 22.04 LTS AMI (Amazon Machine Image).&lt;/li&gt;
&lt;li&gt;t3.micro instance.&lt;/li&gt;
&lt;li&gt;Enabled SSH (port 22) and access from anywhere (0.0.0.0/0) by configuring security settings.&lt;/li&gt;
&lt;li&gt;Generated an SSH key pair to connect to my instance securely.&lt;/li&gt;
&lt;li&gt;Then, launched my instance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Connecting to the Instance, Installing and Configuring NGINX&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;After my EC2 Instance's state changed to 'Running', I connected it to the EC2 Instance Connect and began installing NGINX.&lt;br&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%2Ftwe0vfktuhtn1rafiky1.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%2Ftwe0vfktuhtn1rafiky1.png" alt="Image description" width="800" height="327"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To install NGINX, I use the following commands:&lt;br&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%2Fhp47n4meg3xnjo669h90.jpeg" 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%2Fhp47n4meg3xnjo669h90.jpeg" alt="Image description" width="800" height="231"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To add HTML content to my web server, I used the vi editor. 'vi' allowed me to add a message that included both my name and slack username.&lt;br&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%2F8ne2fucqetn35en60mod.jpeg" 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%2F8ne2fucqetn35en60mod.jpeg" alt="Image description" width="800" height="122"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I exited vi editor and restarted NGINX with the following commands:&lt;br&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%2Fj6md974gvxa1ar3fykf1.jpeg" 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%2Fj6md974gvxa1ar3fykf1.jpeg" alt="Image description" width="800" height="138"&gt;&lt;/a&gt;&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%2Fkud8wv5gmbqhl4wzuf1e.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%2Fkud8wv5gmbqhl4wzuf1e.png" alt="Image description" width="800" height="303"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I navigated to the public IPv4 address in a web browser, verifying that my custom message was displayed.&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%2Fqdexfseppy7icaqrwwxp.jpeg" 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%2Fqdexfseppy7icaqrwwxp.jpeg" alt="Image description" width="800" height="158"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Challenges and Solutions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The web server was inaccessible after I copied its IPv4 address to a web browser. I had to configure my security group to allow traffic from anywhere on port 80, which got the job done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How This Task contributed to My Learning and Professional Objectives&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;My understanding of networking, cloud infrastructure, and server administration has been improved by completing this task. It was an important step in my path to becoming a DevOps engineer. Working hands-on with AWS and NGINX helped me enhance my troubleshooting skills and expand my knowledge of cloud-based deployments.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
