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.
As a first step, you need to extract the new folder. You can use 7-zip, WinRAR or any other popular compression software.
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.”
Paste the folder in the program files. We will run Nginx from this location as a default web service program.
To install and run Nginx, select and double-click the Nginx.exe file. It has now been activated for further use.
In the next step you need 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 Nginx web server is successfully installed and working, there are no problems in your Windows 10 installation.
To stop Nginx, you can end it from the Task Manager window.
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.”
It will take a while for IIS to be enabled on your computer as the changes are applied.
You can open IIS Manager directly from the Start menu. Here, you will be able to access the default website, which is 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.”
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.
In Notepad++, change the root to the edited physical path which we discussed above.
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.
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 resources site has a full list of web server applications which you can use to run various applications on Windows PC.
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.