Backend Development 7 min read

How to Set Up a Free Nginx Web Server and Enable Intranet Penetration

This guide walks you through installing Nginx, configuring a basic website, creating an HTML page with CSS, launching the server, and using a free tunneling service to expose the site to the public internet, all without any cost.

Selected Java Interview Questions
Selected Java Interview Questions
Selected Java Interview Questions
How to Set Up a Free Nginx Web Server and Enable Intranet Penetration

After realizing the need for a free personal website, the author explores two free web server tools—Apache and Nginx—and chooses Nginx for demonstration.

1. Install Nginx

Download the Nginx 1.23.1 package from the official site, unzip it, and observe the directory structure.

2. Configure Nginx

Edit nginx.conf in the conf folder, uncommenting and adjusting key directives as needed.

3. Start Nginx Service

Run nginx.exe from the root directory; a brief console window indicates successful startup, and the site becomes accessible via the configured host and port.

4. Add Website Files

Create an index.html file with HTML and CSS (shown below) to display a simple login page, then save and reload the browser to view the result.

<!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,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 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>

5. Intranet Penetration (Tunneling)

Since the server is only reachable within the local network, the author recommends using the free “Feige” tunneling service: register, create a tunnel with a free node, set the local IP and port, download the client, run the provided script, and copy the generated command to establish the public tunnel.

After the tunnel is active, the previously created website can be accessed from anywhere using the provided public address.

BackendDevOpsNginxweb serverTutorialFree Hostingintranet tunneling
Selected Java Interview Questions
Written by

Selected Java Interview Questions

A professional Java tech channel sharing common knowledge to help developers fill gaps. Follow us!

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.