Build a Personal Nginx Web Server on a Spare PC – Step‑by‑Step Guide
This tutorial walks you through downloading, installing, configuring, and launching Nginx on an old computer, adding a simple HTML page, and exposing the site to the internet using a free tunneling service, all with clear screenshots and code examples.
The author shares a step‑by‑step guide to set up a personal Nginx web server on an old computer, covering download, installation, basic configuration, launching, adding a simple HTML page, and making the site reachable from outside the local network via a free tunneling service.
1. Install Nginx
Download Nginx 1.23.1 from the official site or the provided link, unzip the archive, and note the directory layout.
Only a subset of Nginx features is needed for a basic server.
2. Configure Nginx
Edit nginx.conf in the conf folder; lines starting with “#” are comments that can be removed to activate the settings.
3. Start Nginx Service
Run nginx.exe from the Nginx root directory; a brief console window indicates a successful start. Open a browser and navigate to your-hostname:port to see the default page.
4. Add Your Website Files
Create an index.html file in the configured folder and paste the following HTML/CSS code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {margin:0;padding:0;}
html {height:100%;}
body {height:100%;}
.container {height:100%;background-image:linear-gradient(to right, #fbc2eb, #a6c1ee);}
.login-wrapper {background-color:#fff;width:358px;height:588px;border-radius:15px;padding:0 50px;position:relative;left:50%;top:50%;transform:translate(-50%,-50%);}
.header {font-size:38px;font-weight:bold;text-align:center;line-height:200px;}
.input-item {display:block;width:100%;margin-bottom:20px;border:0;padding:10px;border-bottom:1px solid rgb(128,125,125);font-size:15px;outline:none;}
.input-item:placeholder {text-transform:uppercase;}
.btn {text-align:center;padding:10px;width:100%;margin-top:40px;background-image:linear-gradient(to right, #a6c1ee, #fbc2eb);color:#fff;}
.msg {text-align:center;line-height:88px;}
a {text-decoration:none;color:#abc1ee;}
</style>
</head>
<body>
<div class="container">
<div class="login-wrapper">
<div class="header">Login</div>
<div class="form-wrapper">
<input type="text" name="username" placeholder="username" class="input-item">
<input type="password" name="password" placeholder="password" class="input-item">
<div class="btn">Login</div>
</div>
<div class="msg">Don't have account? <a href="#">Sign up</a></div>
</div>
</div>
</body>
</html>Rename the file to index.html, save it, and reload the browser to view the styled page.
5. Enable Intranet Penetration
To make the site accessible from outside the local network, use a tunneling service such as FeiGe.
5.1 Register
Sign up on the FeiGe website.
5.2 Open Tunnel
Select a free node, enter your local IP and the Nginx port, and confirm to obtain a public domain and IP.
5.3 Start Service
Download the client, run the provided script, paste the tunnel command, and the public address will forward to your Nginx page.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Programmer DD
A tinkering programmer and author of "Spring Cloud Microservices in Action"
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
