问题原文
原帖链接 · IAmJulianAcosta · CC BY-SA 3.0
I'm trying to use a variable in nginx in server_name, but is not working. Is this possible?
server {
listen 80;
index index.php index.html;
set $foo "bar.example.com";
server_name $foo;
}
已采纳解答
原帖链接 · user9517 · CC BY-SA 3.0
No it's not possible unless you want to set it to exactly the $hostname variable.
Ref:
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
