02 / STEP-BY-STEP DEPLOYMENTPAGE 4 OF 4

Deploy the repository and open the live website

The next commands clone the public starter repository onto EC2 and copy only the website files into Nginx's public directory.

Step 7 — Clone and deploy website files

Inside your active SSH terminal on EC2, download the starter website repository branch:

RUN INSIDE THE SSH SESSION
cd ~
git clone --branch gh-pages --single-branch \
  https://github.com/zirafa/simple-website-template.git \
  my-first-website
ls -la ~/my-first-website

• cd ~: Navigates to your remote user's home directory (/home/ec2-user).

• git clone --branch gh-pages --single-branch: Downloads only the starter template branch rather than the entire commit history.

• ls -la ~/my-first-website: Inspects the downloaded files. Confirm that index.html, style.css, script.js, logo.png, and background.jpg exist before copying.

Copy Only Public Website Files

The Nginx document root for this workshop is /usr/share/nginx/html/. Copy the HTML, CSS, JavaScript, and referenced image assets into that directory:

COPY PUBLIC FILES — DO NOT COPY .GIT OR SECRETS
sudo cp ~/my-first-website/index.html \
  ~/my-first-website/style.css \
  ~/my-first-website/script.js \
  ~/my-first-website/logo.png \
  ~/my-first-website/background.jpg \
  /usr/share/nginx/html/
sudo nginx -t && sudo systemctl reload nginx

• sudo cp ... /usr/share/nginx/html/: Copies the five designated public assets into Nginx's default web directory.

• sudo nginx -t: Verifies Nginx configuration syntax for any syntax or permissions errors.

• sudo systemctl reload nginx: Gracefully reloads the web server to immediately serve the new files.

PUBLIC DIRECTORY = PUBLIC FILES

Never place .env files, passwords, AWS access keys, private SSH keys, API tokens, or other secrets in /usr/share/nginx/html/.

This directory is for website assets that visitors may freely download over the public internet. Anything served publicly should be treated as information accessible to everyone. Keep private configuration and credentials outside the web root.

Step 8 — Open the live website

Open a new browser tab on your computer and paste your instance's public IPv4 address with the http:// prefix:

PASTE THE REAL PUBLIC IPV4 ADDRESS INTO YOUR BROWSER
http://YOUR_PUBLIC_IP

• Replace YOUR_PUBLIC_IP with the actual public IPv4 address copied from the EC2 Console.

• HTTP vs HTTPS: This starter exercise uses plain HTTP on port 80. HTTPS requires a custom domain, DNS validation, and a TLS certificate, which are covered in subsequent advanced workshops.

• IP Persistence: A standard public IPv4 address will change if the EC2 instance is stopped and restarted. If your URL stops responding after a restart, check the updated public address in the EC2 Console.

Screenshot Targets for the Live Workshop

Students completing this workshop for credit or certification must capture the five required operational milestones:

SCREEN 01
Launch Page
OS + instance type
SCREEN 02
Network Rules
SSH 22: My IP; HTTP 80: public
SCREEN 03
Instance Status
Running + status checks
SCREEN 04
Terminal
Nginx active + HTTP 200 test
SCREEN 05
Browser
Website + public URL
These are capture instructions, not screenshots from a live AWS account. Never capture a private key, password, or secret.
SCREENSHOT TARGET 6 • PROOF OF DEPLOYMENT

Capture your browser address bar showing the active public IPv4 address alongside the deployed website rendering correctly. This represents primary tangible proof that your public web server is working.

The browser opens the expected public IPv4 URL (http://YOUR_PUBLIC_IP).
The deployed page layout renders correctly with styles and fonts intact.
CSS, JavaScript, and image assets load as expected without 404 errors.
The page displays the starter template content, not the default Nginx welcome splash.
No credentials, passwords, or private key information appear anywhere in the screenshot.

Your Website Is Live

Congratulations! You have taken a static website from a GitHub repository, prepared an EC2 virtual machine, configured firewall network rules, installed Nginx on Amazon Linux 2023, published the files, and verified the live result through a public browser URL.

If your website does not look correct or the public URL does not respond, use the systematic troubleshooting checklist in the next chapter to diagnose the problem.

Full-Scale AWS Deployment BlueprintArchitecture Map

Interactive end-to-end cloud pipeline: from Git starter repository to live Nginx server.

AWS Cloud Launchpad Architecture and Deployment Blueprint
EC2 • VPC • NGINX • GIT • SECURITY GROUPS
Source: src/public/assets/image.png
AWS LAUNCHPAD 2026•Hosted by AWS SBG PSIT