How To Run Nginx on Windows Server 2019

In this article, we want to teach you How To Run Nginx on Windows Server 2019.

NGINX is a web server but is commonly used as a reverse proxy. It can be scaled efficiently as a web server as well as a reverse proxy.

It does not allow you to allocate a process to a particular connection, but it creates a process pool that can be easily shared among multiple connections within the network.

How To Run Nginx on Windows Server 2019

To run Nginx on your Windows Server, first, you need to install it on your Windows server. To do this, you can follow our article about How To Install Nginx on Windows Server 2019.

Also, you need to enable IIS on your Windows Server, To do this, you can check our article in the Windows Tutorials section about How To Set up IIS on Windows Server 2019.

Now follow the steps below to run Nginx on your Windows Server.

Running Nginx on Windows Server

We assumed that you have enabled IIS on Windows Server 2019 from the requirements. Now open the IIS manager directly from the start menu and run it as an administrator.

Open IIS on Windows Server 2019

Here you can access the default website, which is usually located at “inetpub wwwroot.”

It is recommended to change the Physical path of this root. Create a new folder named “Work” in C:\. From your IIS manager on the default website right-click on it and click on the manage website and open advanced settings.

manage websites on windows server 2019

In the Advanced settings windows, from the Physical path open it and change the path to the work folder that you have made and press ok.

Change physical path

At this point, go to the Nginx folder and open the conf folder on Windows Server 2019. Right-click on the Nginx.conf file, and open the file with Notepad or another editor that you want.

Nginx conf file on Windows Server

In your Notepad, find the location of your root and change it to the Physical path that you have defined above.

Configure Nginx

When you are done, save and close the file.

Now you can edit the index.html file and change the text. Open the Nginx HTML file on Windows Server 2019 and right-click on the index.html file and open it with Notepad.

Test Nginx

When you are done, save and close the file.

Now exit the Nginx.exe program using “End Task.” Open and run the “nginx.exe” file in Admin mode.

Then, in your web browser type localhost, and you will the hello world message.

Conclusion

At this point, you learn to run Nginx on your Windows Server 2019.

Hope you enjoy using it.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!