两个域名想指向同一个网站ip;
在http{}中新增server配置;
原有server
server {
listen 80 default_server;
server_name www.**.cn;
root /usr/share/nginx/html;
}
server {
#SSL 默认访问端口号为 443
listen 443 ssl;
server_name cloud.***.com;
ssl_certificate cloud.***.com_bundle.crt;
ssl_certificate_key cloud.***.com.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location / {
root html;
index index.htm