nginx Windows: setting up sites-available configs

后端 未结 4 1056
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-08 15:49

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

4条回答
  •  孤城傲影
    2020-12-08 16:23

    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).

提交回复
热议问题