How to setup mass dynamic virtual hosts in nginx?

前端 未结 7 1801
借酒劲吻你
借酒劲吻你 2021-01-30 09:42

Been playing with nginx for about an hour trying to setup mass dynamic virtual hosts. If you ever done it in apache you know what I mean.

Goal is to have dynamic subdom

7条回答
  •  醉梦人生
    2021-01-30 10:02

    Another alternative is to have includes a few levels deep so that directories can be categorized as you see fit. For example:

    include sites-enabled/*.conf;
    include sites-enabled/*/*.conf;
    include sites-enabled/*/*/*.conf;
    include sites-enabled/*/*/*/*.conf;
    

提交回复
热议问题