How to Install Nginx on Windows 11

Nginx is a fast and lightweight web server that is becoming increasingly popular among web developers. If you want to install Nginx on your Windows 11 computer, follow these simple steps:

Step 1: Download Nginx

Visit the Nginx website at http://nginx.org/ and download the latest stable version of Nginx for Windows.

Step 2: Extract the Nginx File

Once the download is completed, extract the contents of the downloaded file to a folder of your choice. In this tutorial, we will extract the file to the C:\nginx folder.

Step 3: Configure Nginx

  1. Open the C:\nginx folder and navigate to the conf subfolder.
  2. Locate the nginx.conf file and open it with a text editor such as Notepad.
  3. Find the server directive and add the following code to the configuration file:
server {
    listen       80;
    server_name  localhost;
    root         C:/nginx/html;
    index        index.html;
}
  1. Save the changes and close the text editor.

Step 4: Start Nginx

  1. Open the command prompt by pressing the Win key + R, typing "cmd" and pressing Enter.
  2. Navigate to the C:\nginx folder using the command prompt.
  3. Run the following command to start Nginx:
nginx
  1. Open a web browser and navigate to http://localhost/.
  2. If the installation was successful, you should see the "Welcome to nginx!" page.

Congratulations! You have successfully installed Nginx on your Windows 11 computer.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!