dns - is there any limit for using server_name domains in nginx? -
i want point multiple domains nginx instance. use server_name pointing them.
server_name mydomain.com www.mydomain.com test.mydomain.com test1.mydomain.com; is above given best practice or there's other safe/stable method doing same?
you define quite lot server_names (even few thousand won't slow down). however, if want config remain readable, should either:
- use regex match host string server block
- use default server match not explicitly defined in other server
- blocks use wildcard
server_names
keep in mind using exact names faster using wildcards or regex.
in case want stick using long list of server names, should include additional config file:
server { include /somewhere/server_names; ... } add. file:
server_name mydomain.com www.mydomain.com ... see nginx docs on server_name more info...
Comments
Post a Comment