简体   繁体   English

nginx 中的服务器名称到底有什么作用?

[英]What exactly does server name do in nginx?

I kind of understand that once you are accessing nginx say via localhost, the exact server that is matched is determined by the port and the server_name which is the request "Host" header.我有点理解,一旦你通过 localhost 访问 nginx,匹配的确切服务器由端口和 server_name 确定,即请求“主机”header。 But what exactly does server_name do besides that?但除此之外,server_name 究竟做了什么? Or is that the only function?还是只有function?

You are right, this is the only function.你是对的,这是唯一的 function。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM