Is there a way to do the following with a wildcard in the server name? We have some domains with names like something-code1.company.com, something-code2.company.com, something-coden.company.com. We would like to set the server name in the config to something-*.company.com but when I do this I get:
Restarting nginx: [emerg]: invalid server name or wildcard "something-*.company.com" on 0.0.0.0:80
My simple config for this test is:
server {
listen 80;
server_name something-code1.company.com something-*.company.com;
root /var/www/my_dir;
index index.html;
}