Windows NGINX Installation

Let’s go through to setup NGINX on Windows

DOWNLOAD NGINX FILES

Head over to the NGINX website and download the current version of NGINX so we may proceed.

Nginx Website

EXTRACT NGINX

In this tutorial we will be using the path of C:/nginx for everything

Once you have download the nginx zip file, extract the contents of the folder inside the zip into C:/nginx

If you already have NSSM installed on Windows, skip the next two steps.

OPTIONAL

If you already have NSSM installed, you may skip this step.

DOWNLOAD NSSM

Download From NSSM Webpage

Head over to the NSSM Webpage and download the pre-release  Zip file so we may extract it for Windows Command Prompt.

OPTIONAL

If you already have NSSM installed, you may skip this step.

EXTRACT NSSM

Now that you have download the NSSM Zip file.  Go ahead and unzip that file and navigate to the folder that has win32 and win64 folders.  Depending on your Windows installation [More than likely 64bit] go into the correct folder.  Copy the nssm.exe file into C:/windows/system32/

INSTALL NGINX USING NSSM

Open up Command Prompt [Type cmd in start bar] by Right-Clicking it and selecting Run as Administrator.

Then type nssm install nginx

Then fill out the box like the image.

EDIT NGINX SERVICE

  1. Open up Run [Windows Key + R] and type services.msc and hit Enter.
  2. Find nginx under the Name column.
  3. Right Click and select properties and goto Log On tab.
  4. Click This Account and fill out the user information.
  5. If it helps, click Browse and type in your username and click Check Names.
  6. Once it finds you name click OK and type in your password and click Apply.
  7. Click Start or Restart Service
  8. Make sure no errors came up.
CONTINUE TO PHP INSTALLATION

Now that NGINX is installed, we need to install PHP and configure both of them to work together.

PHP INSTALLATION