复制下面代码 到你的配置文件的最开始位置
其含义就是 先监测80端口是否aaa.aaa.aaa网站有被访问
如果有被访问就直接跳转到aaa.aaa.aaa网站的server 以此类推

### 强制 80端口 443端口 跳转 ---
server{
listen 80;
server_name
**aaa.aaa.aaa #aaa网站**
**bbb.bbb.bbb #bbb网站**
# 每个域名前面加一个空格,一行一个域名
;
rewrite ^(.*)$ https://$host$1 permanent;
}
### 强制 80端口 跳转 443端口 ===

aaa.aaa.aaa 网站

server {
listen 443 ssl;
server_name aaa.aaa.aaa;
location / {
proxy_pass https://aaa.aaa.aaa:88/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
}
}

bbb.bbb.bbb 网站

server {
listen 443 ssl;
server_name  bbb.bbb.bbb;
location / {
proxy_pass  https://bbb.bbb.bbb:88/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
}
}