文章目录
  1. 1. NGINX HTTPS SERVER
  2. 2. 官方说明

NGINX HTTPS SERVER

  • NGINX在配置HTTPS Server时,如果一个IP配置多个HTTPS服务连接,会存在问题。其官方给出了相关解答:

  • Configuring HTTPS servers

官方说明

1
2
3
4
5
6
7
8
9
10
11
12
13
server {
listen 443 ssl;
server_name www.example.com;
ssl_certificate www.example.com.crt;
...
}

server {
listen 443 ssl;
server_name www.example.org;
ssl_certificate www.example.org.crt;
...
}

With this configuration a browser receives the default server’s certificate, i.e. www.example.com regardless of the requested server name. This is caused by SSL protocol behaviour. The SSL connection is established before the browser sends an HTTP request and nginx does not know the name of the requested server. Therefore, it may only offer the default server’s certificate.

文章目录
  1. 1. NGINX HTTPS SERVER
  2. 2. 官方说明