<?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: Matt Audu</title>
    <description>The latest articles on DEV Community by Matt Audu (@matt_audu_688e5578073f953).</description>
    <link>https://dev.to/matt_audu_688e5578073f953</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%2F1800152%2F7315d554-ddee-49be-822a-d02ffb3f330e.jpg</url>
      <title>DEV Community: Matt Audu</title>
      <link>https://dev.to/matt_audu_688e5578073f953</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/matt_audu_688e5578073f953"/>
    <language>en</language>
    <item>
      <title>Static Website Deployment with Nginx (HNG 12)</title>
      <dc:creator>Matt Audu</dc:creator>
      <pubDate>Tue, 28 Jan 2025 23:47:35 +0000</pubDate>
      <link>https://dev.to/matt_audu_688e5578073f953/static-website-deployment-with-nginx-hng-12-39e8</link>
      <guid>https://dev.to/matt_audu_688e5578073f953/static-website-deployment-with-nginx-hng-12-39e8</guid>
      <description>&lt;p&gt;Hello guys! This project marks the beginning of my journey at HNG 12 and I'll love to share my experience. In this article, I will walk you through deploying a static website using Nginx. You’ll learn how to set up Nginx, configure it for optimal performance, and easily deploy your static site. By the end, you’ll have a fully functional, blazing-fast website ready to impress your visitors. Let’s dive in!&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before we begin, make sure you have the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A server or virtual machine (Ubuntu).&lt;/li&gt;
&lt;li&gt;A static website (HTML, CSS, JS files) ready for deployment.&lt;/li&gt;
&lt;li&gt;SSH access to your server.&lt;/li&gt;
&lt;li&gt;Basic familiarity with the command line.&lt;/li&gt;
&lt;li&gt;Allow access to Port 22 and 80&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 1: SSH into your server
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Step 2: Create a shell script e.g nginx_script.sh
&lt;/h2&gt;

&lt;p&gt;Copy the script below to install nginx and deploy your static website&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#!/bin/bash
sudo apt update
sudo apt install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginx
sudo systemctl status nginx
echo "&amp;lt;!DOCTYPE html&amp;gt; 
&amp;lt;html&amp;gt; 
&amp;lt;head&amp;gt; 
&amp;lt;title&amp;gt;HNG Project 0&amp;lt;/title&amp;gt; 
&amp;lt;/head&amp;gt; 
&amp;lt;body&amp;gt; 
&amp;lt;h1&amp;gt;Welcome to DevOps Stage 0 - Mbarimam Matthew Audu/Matthew Audu&amp;lt;/h1&amp;gt; 
&amp;lt;/body&amp;gt; 
&amp;lt;/html&amp;gt;" | sudo tee /var/www/html/index.html 
sudo systemctl restart nginx
sudo systemctl status nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Make your nginx_script.sh executable
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chmod +x script.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Run the script
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./nginx_script.sh
&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%2F5nkzejv08oc89ult484r.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%2F5nkzejv08oc89ult484r.png" alt="Image description" width="800" height="271"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Running and working with shell scripts, especially in deploying a static website with Nginx, is a valuable hands-on learning experience. Shell scripts eliminate the tensity of running manual commands and save you half the time.&lt;/p&gt;

&lt;p&gt;HNG 12 internship will be a valuable learning experience for me in my professional development as a DevOps/Cloud Engineer. Truly I can't wait to dive deeper and work on more exciting projects like this and hopefully, I can get to the final stage and be part of the pool of exceptional talents below;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DevOps Engineers - &lt;a href="https://hng.tech/hire/devops-engineers" rel="noopener noreferrer"&gt;https://hng.tech/hire/devops-engineers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Cloud Engineers - &lt;a href="https://hng.tech/hire/cloud-engineers" rel="noopener noreferrer"&gt;https://hng.tech/hire/cloud-engineers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Site Reliability Engineers - &lt;a href="https://hng.tech/hire/site-reliability-engineers" rel="noopener noreferrer"&gt;https://hng.tech/hire/site-reliability-engineers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Platform Engineers - &lt;a href="https://hng.tech/hire/platform-engineers" rel="noopener noreferrer"&gt;https://hng.tech/hire/platform-engineers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Infrastructure Engineers - &lt;a href="https://hng.tech/hire/infrastructure-engineers" rel="noopener noreferrer"&gt;https://hng.tech/hire/infrastructure-engineers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Kubernetes Specialists - &lt;a href="https://hng.tech/hire/kubernetes-specialists" rel="noopener noreferrer"&gt;https://hng.tech/hire/kubernetes-specialists&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;AWS Solutions Architects - &lt;a href="https://hng.tech/hire/aws-solutions-architects" rel="noopener noreferrer"&gt;https://hng.tech/hire/aws-solutions-architects&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Azure DevOps Engineers - &lt;a href="https://hng.tech/hire/azure-devops-engineers" rel="noopener noreferrer"&gt;https://hng.tech/hire/azure-devops-engineers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Google Cloud Engineers - &lt;a href="https://hng.tech/hire/google-cloud-engineers" rel="noopener noreferrer"&gt;https://hng.tech/hire/google-cloud-engineers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;CI/CD Pipeline Engineers - &lt;a href="https://hng.tech/hire/ci-cd-pipeline-engineers" rel="noopener noreferrer"&gt;https://hng.tech/hire/ci-cd-pipeline-engineers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Monitoring/Observability Engineers - &lt;a href="https://hng.tech/hire/monitoring-observability-engineers" rel="noopener noreferrer"&gt;https://hng.tech/hire/monitoring-observability-engineers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Automation Engineers - &lt;a href="https://hng.tech/hire/automation-engineers" rel="noopener noreferrer"&gt;https://hng.tech/hire/automation-engineers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docker Specialists - &lt;a href="https://hng.tech/hire/docker-specialists" rel="noopener noreferrer"&gt;https://hng.tech/hire/docker-specialists&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Linux Developers - &lt;a href="https://hng.tech/hire/linux-developers" rel="noopener noreferrer"&gt;https://hng.tech/hire/linux-developers&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;PostgreSQL Developers - &lt;a href="https://hng.tech/hire/postgresql-developers" rel="noopener noreferrer"&gt;https://hng.tech/hire/postgresql-developers&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And there you have it deploying a static website with Nginx is simpler than it sounds! By following this guide, you’ve set up a fast, secure, and scalable way to serve your static files. Whether it’s a personal blog, a portfolio, or a documentation site, Nginx has got your back.&lt;/p&gt;

&lt;p&gt;This isn’t just about getting your site live; it’s about learning skills that’ll help you grow as a developer or tech professional. The more you tinker with Nginx and scripting, the more you’ll discover ways to make your workflows smoother and more efficient. So go ahead, put your site out there, and keep building on what you’ve learned. You’ve got this! &lt;/p&gt;

</description>
      <category>devops</category>
      <category>cloud</category>
      <category>hng</category>
      <category>nginx</category>
    </item>
  </channel>
</rss>
