Build a Free Nginx Web Server on Windows – No Cost, No Domain Needed
Learn step‑by‑step how to download, install, configure, and launch Nginx on Windows, create a simple HTML site, and expose it to the internet for free using a tunneling service, all without spending money on servers or domain names.
The author wants to create a personal website without paying for a server or domain and explores completely free solutions.
1. Install Nginx
Download Nginx from the official site ( nginx-1.23.1.zip ) or the provided link, unzip the archive, and you will see the directory structure.
Only a subset of Nginx features is needed for a simple static site.
2. Configure Nginx
Edit nginx.conf in the conf folder. Commented lines start with #; remove the # to activate a setting.
3. Start Nginx Service
Run nginx.exe from the Nginx root directory. A brief black console window indicates that Nginx has started successfully. Open a browser and navigate to host:port to see the default page.
4. Add Website Files
Create a index.html file with simple HTML and CSS, place it in the folder configured as the document root, and refresh the browser.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
* { margin:0; padding:0; }
html, body { height:100%; }
.container { height:100%; background-image:linear-gradient(to right, #fbc2eb, #a6c1ee); }
.login-wrapper { background:#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 #7d7d7d; font-size:15px; outline:none; }
.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">
<input type="password">
<div class="btn">Login</div>
</div>
<div class="msg">Don't have account? <a href="#">Sign up</a></div>
</div>
</div>
</body>
</html>The page is built with HTML and CSS; you can also place other static assets such as images, videos, or archives in the same folder.
5. Enable External Access (Intranet Penetration)
To allow users outside the local network to reach the site, use a tunneling service like FeiGe.
5.1 Register
Sign up on the FeiGe website.
5.2 Open Tunnel
Select a free node, set the front‑end domain as you wish, and configure the local IP and the Nginx listening port.
5.3 Start Service
Download the client for your OS, unzip it, and run the provided .vbs script. Copy the command shown on the FeiGe portal into the script’s prompt and confirm to start the tunnel.
After the tunnel is running, the website can be accessed via the public address provided by FeiGe, completing the free, publicly reachable Nginx site.
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.
Java High-Performance Architecture
Sharing Java development articles and resources, including SSM architecture and the Spring ecosystem (Spring Boot, Spring Cloud, MyBatis, Dubbo, Docker), Zookeeper, Redis, architecture design, microservices, message queues, Git, etc.
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.
