我在一台虚拟机上(同一个IP)搭建了LNMP环境,然后部署两个网站(两个域名),分别时www.iwwenbo.com,www.weiyanzixun.com,域名解析正常,同时开启了https证书。现在的问题是我访问www.iwwenbo.com这个域名时,经常会跳转到www.weiyanzixun.com这个域名上,请问我的配置问题出在哪里?
环境:
nginx version: nginx/1.12.1
两个域名的nginx配置文件分别如下:
配置1:.iwwenbo.https.conf
server{
listen 80;
server_name iwwenbo.com www.iwwenbo.com;
add_header Strict-Transport-Security max-age=15768000;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name iwwenbo.com www.iwwenbo.com;
index index.php index.html index.htm;
root /usr/share/nginx/html;
add_header X-Frame-Options DENY;
add_header X-Content-Type-Options nosniff;
ssl_certificate /etc/letsencrypt/live/iwwenbo.com/fullchain.pem;
ssl_certifica