use an empty name as default server_name instread of hostname
diff --git a/src/http/ngx_http_core_module.c b/src/http/ngx_http_core_module.c
index 8f1ab08..f4d0aae 100644
--- a/src/http/ngx_http_core_module.c
+++ b/src/http/ngx_http_core_module.c
@@ -3011,7 +3011,7 @@
}
if (conf->server_name.data == NULL) {
- conf->server_name = cf->cycle->hostname;
+ ngx_str_set(&conf->server_name, "");
sn = ngx_array_push(&conf->server_names);
if (sn == NULL) {
@@ -3022,8 +3022,7 @@
sn->regex = NULL;
#endif
sn->server = conf;
- sn->name.len = conf->server_name.len;
- sn->name.data = conf->server_name.data;
+ ngx_str_set(&sn->name, "");
}
return NGX_CONF_OK;