我有一个带有许多虚拟服务器的 Web 服务器。其中只有 1 个是 SSL。问题是,因为没有包罗万象的服务器块侦听 SSL,对其他站点的任何 https 请求都由 1 SSL 块提供服务。
我的配置基本上是这样的:
# the catch all
server {
listen 80 default;
# I could add this, but since I have no default cert, I cannot enable SSL,
# and this listen ends up doing nothing (apparently).
# listen 443;
server_name _;
# ...
}
# some server
server {
listen 80;
server_name server1.com;
# ...
}
# some other server ...
server {
listen 80;
server_name server2.com;
# ... …Run Code Online (Sandbox Code Playgroud)