You are on page 1of 1

ContactUs Status  Sign Up

 RESOURCES  Sign In 
PRIVATE CLOUD PUBLIC CLOUD  SOLUTIONS VEXXHOST

 Search...
home / nginx windows: how to install

 Previous Next 

Welcome to VEXXHOST! What 2

can we help you with?


Nginx Windows: How to Install

Nginx is an extremely high performance web server which has the ability to handle thousands of requests per
second with little hardware requirements. It can be installed on any operating system and it comes as an open
source application as well.

As much as Nginx is setup and supported for Windows, it does come with quite a few issues which limit it’s
performance. We strongly recommend that you setup Nginx on a Linux server. You can get started on our
cloud servers for just a few dollars per month.

We’re going to go over how to install Nginx for Windows and we will also cover the details of how to set it up
as a service within Windows, so it can start automatically.. You will need to have full Administrator access to
the machine that you will be setting up as well to continue.

Download & Extract Nginx


Nginx comes pre-compiled for Windows which makes it extremely easy to get started. If it did not come pre-
compiled, you would need to have a compiler installed on your computer with a full environment. Fortunately,
this is not the case. At the time of this article, the latest Nginx version is 1.5.4 so we’ll download it from here:

Download Nginx Windows

Once you’ve downloaded Nginx for Windows, you can extract it to your folder of choice, we recommend that
you install it somewhere easily accessible such as C:nginx.

Verify Nginx Windows Installation


In order to make sure that the service is working with no problems, we recommend that you start a command
prompt window and type the following, make sure that you update the path if you’ve installed it in another
folder.

C:/nginx/nginx.exe

You should be able to go to http://localhost/ and you should see the “Welcome to Nginx” default page. If
you see that page, then we can be sure that Nginx has been installed properly. We will now shut it down and
install it as a service, to stop it, you can use this command.

C:/nginx/nginx.exe -s stop

Now, if you were using Nginx as a simple development server, you can use these simple commands to start
and stop the server as you need. However, if you will be using it as a production server, you would want to
install it as a Windows service, which is what we’re covering in the next step.

Install Nginx Windows Service


We will be using the WINSW project to create a service out of the existing Nginx binaries. The rst step is to
download it from the following URL and save it in the same folder as Nginx as nginxsvc.exe.

Download WINSW

Once that is setup, you will need to create a service le, please be sure to create a le with the name
nginxsvc.xml and with the following contents:

<service>
<id>nginx</id>
<name>nginx</name>
<description>nginx</description>
<executable>c:nginxnginx.exe</executable>
<logpath>c:nginx</logpath>
<logmode>roll</logmode>
<depend></depend>
<startargument>-p c:nginx</startargument>
<stopargument>-p c:nginx -s stop</stopargument>
</service>

You are now ready to install the Windows service, you can proceed to run the following command:

C:/nginx/nginxsvc.exe install

You can now proceed to manage the service from your service manager. The easiest and fastest way to
access it is to type the following in your command prompt:

services.msc

You should be all setup and done at this point. You have Nginx as a service and you can set it up to start
automatically when it is booted with your operating system!

Would you like to know about Zuul, a CI/CD project gating


tool? Download our white paper and get reading!

August 30th, 2013 | Comments Off

About the Author: Mohammed Naser

CEO of VEXXHOST by day and avid open source contributor by night, Mohammed contributes
back to projects from OpenStack to Ansible, where he is the PTL. Mohammed is experienced in
infrastructure operations, having deployed, run, and managed OpenStack clouds for over a
decade. You can nd him on Twitter where, you guessed it, he talks open source projects.

Private Cloud Public Cloud Solutions Resources

Overview Overview Overview Overview 6500 Trans-Canada

Services Services OpenStack Consulting Client Success Stories Highway


Fourth Floor
Get A Quote Pricing Kubernetes White Papers
Pointe-Claire QC H9R
Enablement
Why private? Sign Up Now Tutorials 0A5
OpenStack Upgrades
Blog Canada
Managed Zuul
FAQs
About Us Legal
Search
Company Privacy Policy
 Search...
Data Centers Terms of Service

Newsroom Acceptable Usage


Policy
Events

Careers

Brand Guidelines

Contact Us

Copyright © 2005-2020 — VEXXHOST, Inc.


All prices are in USD unless otherwise indicated.

    

You might also like