ScaleScaleScaleScale

Tips / Nginx

How to install Nginx on Windows

Nginx, the popular high performance web server is mostly used on Unix based systems, but, what you probably don’t know is that there is a Nginx version for Windows systems. In this how to we will cover the basic installation of Nginx in Windows.

Before we start you should know about a few issues regarding the Nginx Windows version, direct warning from the developers at nginx.org:

  • Although several workers can be started, only one of them actually does any work.

  • A worker can handle no more than 1024 simultaneous connections.

  • The cache and other modules which require shared memory support do not work on Windows Vista and later versions due to address space layout randomization being enabled in these Windows versions.

Installing Nginx in Windows

A windows console example of the installation would be this:

c:
unzip nginx-1.3.13.zip
cd nginx-1.3.13
start nginx

The Windows version of Nginx can be managed within the console, this are some example to manage the Nginx web server on a Windows Platform:

nginx -s stop	fast shutdown
nginx -s quit	graceful shutdown
nginx -s reload	reload the configuration file
nginx -s reopen	re-opening log files

That’s all 😉

If you need more information about Nginx for Windows, you can check out this page at nginx.org.

Have you ever tried Nginx for Windows? Please let us know about your experience.

Popular search terms:

  • nginx windows
  • nginx windows tutorial
  • how to instal nginx on window
  • nginx window
profile

Chris Ueland

http://www.ueland.com

Wanting to call out all the good stuff when it comes to scaling, Chris Ueland created this blog, ScaleScale. Chris is the CEO of MaxCDN.com

  • Jan de Lint

    Are the rewrite rules using regexp supposed to work on the windows version?
    Tx,
    ]an

  • ORC

    I’m trying to use nginx on windows, but I can get a server working.
    It works for localhost (127.0.0.0.1) but not for a domain.

  • admin

    Ensure the DNS entries are pointing to the right public IP of your server.
    Also ensure you got the virtual host configuration configured ok for your domain inside.
    Check your logs.

  • http://dinesh@xyggy.com dv

    Very useful! Is there a how-to for FastCGI for Python programs? Do you know if the nginx pagespeed module will work for Windows – which is only used for development?

    • admin

      Ngx_pagespeed currently doesn’t support Windows or MacOS, only Linux.

  • http://nginx-win.ecsds.eu/ ITPP

    About these issues at the top of this tip, this is old news, use a proper nginx for windows version which is not crippled, has working multiple workers and can handle c1000k by (re)design, http://nginx-win.ecsds.eu/

  • Hardy Jonck

    Does gzip compression work on Windows? Does not seem like it. Configured a https reverse proxy and it servers – but no compression despite an identical config that works perfectly on linux.

  • Eric

    I tried running it on Windows but the console terminal just pop-up and disappeared in seconds. nginx 1.9.5.
    Can anyone help?