您好我正在尝试使用nginx配置服务器及其子域,但是nginx显示冲突的servername。我试过这些设置。任何人都可以建议我如何使用nginx配置子域? 我收到了错误:
nginx: [warn] conflicting server name ":" on 0.0.0.0:3000, ignored
server{
listen 3000;
server_name : www.website.com website.com;
......
}
server{
listen 3000;
server_name : www.staging.website.com staging.website.com;
......
}
答案 0 :(得分:1)
应该是:
server{
listen 3000;
server_name www.website.com website.com;
......
}
server{
listen 3000;
server_name www.staging.website.com staging.website.com;
......
}
没有冒号。