nginx Windows: setting up sites-available configs

nginx, windows

Solution

The "sites-enabled" approach as used by some Linux packages of nginx utilize `include` directive, which understands shell wildcards, see http://nginx.org/r/include. You may use it in your own config as well, e.g.

http {
    ...
    include /path/to/sites/*.conf;
}

Note though that such approach might be very confusing (in particular, it would be hard to tell which server{} is the default one unless you use `default_server` explicitly).

Problem

I'm trying to set up Nginx on my Windows development environment. I can't find how to create something similar to `"sites-enabled"` on Linux where Nginx would look for (links to) active virtual host configurations. Is there a way to do something similar with a directory with shortcuts to the actual configuration files and Nginx scanning that directory? Or is there another way to hook up a virtual host configuration other than copying the host configuration to `nginx.conf`?

Original source