Install and Run Nginx on Windows Server 2022

In this guide, we want to teach you How To Install and Run Nginx on Windows Server 2022.

NGINX is open-source software for web servers, reverse proxying, caching, load balancing, and media streaming – and is widely used for its high-performance lightweight architecture.

How To Install and Run Nginx on Windows Server 2022

To install Nginx on your Windows Server, first, you need to go to the Download Versions of Nginx for Windows page and download the mainline version.

Download Nginx for windows

Then, you must extract the file into the Program Files folder with popular compression software.

Extract Nginx file

Now you can start to install Nginx on Windows Server 2022.

How To Install Nginx on Windows Server

To install Nginx, open the Nginx file and double-click on the Nginx.exe file.

Nginx exe file

At this point, you can verify that your Nginx server is successfully installed on your Windows server. To do this, open your browser and type:

http://localhost

You will see the Welcome to Nginx page:

Nginx default page

If you see this page means that your Nginx server is successfully installed on your server and it is working correctly.

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

How To Run Nginx on Windows Server

We assumed that you have enabled IIS on Windows Server 2022. To do this, you can check our guide Set up and Configure IIS on Windows Server 2022.

Then, open the IIS manager directly from the start menu and run it as an administrator.

Open IIS on Windows Server 2022

At this point, 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 2022

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 2022. 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 on Windows Server 2022

At this point, 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 2022 and right-click on the index.html file and open it with Notepad.

Test Nginx on Windows server 2022

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 see the hello world message.

Conclusion

At this point, you learn to Install and Run Nginx on Windows Server 2022.

I hope you enjoy it.

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!