<?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: oluwatimileyin adediwura</title>
    <description>The latest articles on DEV Community by oluwatimileyin adediwura (@papit8).</description>
    <link>https://dev.to/papit8</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%2F2785784%2Fd59c4dd5-e8ae-47ea-8da7-ae206d55ba54.JPG</url>
      <title>DEV Community: oluwatimileyin adediwura</title>
      <link>https://dev.to/papit8</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/papit8"/>
    <language>en</language>
    <item>
      <title>Configuring NGINX web server on amazon EC2 : My Experience</title>
      <dc:creator>oluwatimileyin adediwura</dc:creator>
      <pubDate>Thu, 30 Jan 2025 12:15:58 +0000</pubDate>
      <link>https://dev.to/papit8/configuring-nginx-web-server-on-amazon-ec2-my-experience-45nf</link>
      <guid>https://dev.to/papit8/configuring-nginx-web-server-on-amazon-ec2-my-experience-45nf</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 29th, 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;&lt;p&gt;&lt;strong&gt;Ubuntu 22.04 LTS AMI&lt;/strong&gt; (Amazon Machine Image).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;t3.micro instance&lt;/strong&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enabled SSH (port 22) and access from anywhere (0.0.0.0/0) by configuring security settings.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Generated an SSH key pair to connect to my instance securely.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Then, launched my instance.&lt;/p&gt;&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;After my EC2 Instance's state changed to 'Running', I connected it to the EC2 Instance Connect and began installing NGINX.&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%2Fwc1twxz18k01qoycnxg9.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%2Fwc1twxz18k01qoycnxg9.jpg" alt="EC2 instance connect" width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;To install NGINX, I use the following commands:
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&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;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;I exited vi editor and restarted NGINX with the following commands:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo systemctl restart nginx
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%2Fqcn4737bdtfcd2mcgbbc.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%2Fqcn4737bdtfcd2mcgbbc.jpg" alt="Restarting and checking the status of nginx" width="800" height="335"&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%2Fz39xch3fo08buvesdpnu.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%2Fz39xch3fo08buvesdpnu.jpg" alt="Displaying the HTML content" width="800" height="163"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Challenges and Solutions Presented&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;

&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://hng.tech/hire/devops-engineers" class="ltag_cta ltag_cta--branded" rel="noopener noreferrer"&gt;Devops Engineers&lt;/a&gt;
&lt;br&gt;
&lt;a href="https://hng.tech/hire/cloud-engineers" class="ltag_cta ltag_cta--branded" rel="noopener noreferrer"&gt;Cloud Engineers&lt;/a&gt;
&lt;br&gt;
&lt;a href="https://hng.tech/hire/site-reliability-engineers" class="ltag_cta ltag_cta--branded" rel="noopener noreferrer"&gt;Site Reliability Engineers&lt;/a&gt;
&lt;br&gt;
&lt;a href="https://hng.tech/hire/platform-engineers" class="ltag_cta ltag_cta--branded" rel="noopener noreferrer"&gt;Platform Engineers&lt;/a&gt;
&lt;br&gt;
&lt;a href="https://hng.tech/hire/infrastructure-engineers" class="ltag_cta ltag_cta--branded" rel="noopener noreferrer"&gt;Infrastructure Engineers&lt;/a&gt;
&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>devops</category>
      <category>aws</category>
      <category>ubuntu</category>
    </item>
  </channel>
</rss>
