DEV Community

Mayowa
Mayowa

Posted on

1

Nginx(web-server) Installation And Configuration on a Localhost.

In this short guide, I’ll walk you through setting up Nginx to serve a static HTML page on a localhost.

Step 1: Nginx installation on Ubuntu Linux. Starting the nginx server
Step 2: Creation of a custom HTML page.
Step 3: Configuring nginx page
Step 4: Accessing the custom page through: http/localhost/index.html

Challenge faced:
After the installation and configuration of nginx on my localhost, I struggled to locate my custom html page. I kept seeing the nginx default page.

Solution:
After a little troubleshooting, I discovered it was because I didn't add the path "/index.html" at the back of my localhost URL i.e I was using "localhost" instead of "localhost/index.html".

Personal Growth:
I can now confidently deploy custom contents on a lightweight web-server like nginx.

With this few steps, you can deploy a custom HTML page on Nginx running locally. This setup is perfect for testing static websites, local development, or learning how Nginx works.

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay