How to Install and Run the Nginx Server on Windows 10

How to Install and Run the Nginx Server on Windows 10

 

How to Install and Run the Nginx Server on Windows 10




Nginx is a web server that is very popular with Linux and BSD systems. Many assume it is not possible to install Nginx on Windows. That is not true at all because the web server can indeed be installed on Windows 10.

However, according to Nginx’s own website, there are a few performance limitations that have not been mitigated so far. These include only one worker (web application) running successfully, a lack of scalability, and possible UDP authentication issues.

As of now, Nginx has mentioned that it will address all the problems in its future releases for Windows. To install and run Nginx successfully on Windows 10, follow the steps below.

Download the Nginx Server

There are many Windows download versions of Nginx, and Nginx recommends using the “mainline version.” However, you will not find any issues if you download its most recent stable version for Windows.

Select the latest zip file and download it to a new folder.

Download Nginx Windows Zip Version

As a first step, you need to extract the new folder. You can use 7-zip, WinRAR,or any other popular compression software.

Extract New Folder Nginx

After extracting the file contents in the original folder, you have to move the entire folder that came with the built-in download copy. We will have to move this to “Program Files.”

Nginx Extracted Folder

Paste the folder in the program files. We will run Nginx from this location as a default web service program.

Nginx In Program Files

Installing Nginx

To install and run Nginx, select and double-click the Nginx.exe file. It has now been activated for further use.

Nginx Run Installer

In the next step, you needs to verify if the installation has been successful. For this, you can go to your default browser and type “localhost.” If you see the following screen saying the x web server is successfully installed and working, there are no problems in your Windows 10 installation.

Nginx Succesfully Running

To stop Nginx, you can end it from the Task Manager window.

Nginx Stop

Running Nginx on Your Windows PC

To run Nginx, you have to use Internet Information Services (IIS), which is a Microsoft web server that serves requested HTML pages or files. You can enable it from “Turn Windows Features On or Off” on the Control Panel. Check the required fields for “Web Management Tools” and “IIS Management Console.”

Turn Iis On

It will take a while for IIS to be enabled on your computer as the changes are applied.

Applying Windows Features Iis

You can open the Manager directly from the Start menu. Here, you will be able to access the default website, which is usually located  at “inetpub wwwroot.” This is also known as the web application root.

It is helpful to change the physical path of this root to a more desirable folder. I created a new “Work” folder in C:\ and changed the physical path to “C:\Work.”

Default Path Iis Manager Document Root

After this, go to the Nginx folder that you renamed in the Program files. Click “Conf” and select “nginx.conf.” This file can be edited using the Notepad++ text editor.

Edit Nginx Conf File With Notepadplusplus

In Notepad++, change the root to the edited physical path which we discussed above.

Location Docroot

You can edit the index.html file in the root folder in a separate tab. Change the text to what you want the web server to display on the screen.

Change Index Html Page

Now, run the Nginx.exe program once again and type “localhost” on a browser window. The Nginx web server will highlight the edits you made.

Nginx Testing Videos


Nginx resources site has a full list of web server applications which you can use to run various applications on Windows PC.

Summary

Nginx is one of the leading web server companies which is expected to overshadow Apache in the future. Also, it is faster, can handle more concurrent issues, and is reliable. To summarize, if you have a simple website you want to connect to Nginx, you can do it right now without any problems.

Have you tried installing and running Nginx on Windows systems? What were the issues you faced? Do let us know in the comments.

Reactions

Post a Comment

2 Comments

  1. This is one of the best tutorial to setup in local machine. thanks alot!!

    ReplyDelete
  2. Very nice and easy to setup, thanks alot :)

    ReplyDelete

CAN FEEDBACK

Emoji
(y)
:)
:(
hihi
:-)
:D
=D
:-d
;(
;-(
@-)
:P
:o
:>)
(o)
:p
(p)
:-s
(m)
8-)
:-t
:-b
b-(
:-#
=p~
x-)
(k)

close