nginx - two subdomain configuration

后端 未结 5 983
耶瑟儿~
耶瑟儿~ 2020-12-23 13:17

I\'m new to Nginx and I\'m trying to get subdomains working.

What I would like to do is take my domain (let\'s call it example.com) and add:

    <
5条回答
  •  南笙
    南笙 (楼主)
    2020-12-23 14:03

    You just need to add the following line in place of your server_name

    server_name xyz.com  *.xyz.com;
    

    And restart Nginx. That's it.

提交回复
热议问题