While the nginx port forwards, https accesses other pages

Hello, prawns!
there are two services in my NGINX, which occupy port 8080 and port 8088 respectively. The services in nginx.conf are forwarded on different ports. The specific configuration is as follows:


      server {
        listen 80;
        listen 443 ssl;
        server_name dvlec.lechange.com;

        ssl_certificate      /usr/local/nginx/ssl/server-com.crt;
        ssl_certificate_key  /usr/local/nginx/ssl/server-com.key;
        ssl_session_timeout  5m;
        ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
        ssl_ciphers  ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4;
        ssl_prefer_server_ciphers   on;

        location / {
                proxy_pass http://localhost:8080;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Real-Port $remote_port;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}

server {
        listen 80;     -sharp
        listen 8081;        -sharp
        server_name dvllcsvr.lechange.com;
        location / {
                proxy_pass http://localhost:8088;
                proxy_set_header Host $host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Real-Port $remote_port;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
}

then resolve the domain names of dvlec.lechange.com and dvllcsvr.lechange.com to the public IP of this nginx. Now you can open the dvlec page normally through http and https in the browser, and you can also use http to access dvllcsvr, normally. But when I use https to open dvllcsvr, although the address bar of the browser has not changed, the content is the content of dvlec, may I ask why?


because the default server of port 443 is dvlec, it displays the content of dvlec
if you point notexist.lechange.com to the public network IP, using https access will also display the content of dvlec

.

if you don't want this to happen, you need to configure a default https server

      server {
        listen 443 ssl default_server;
        server_name _;
        ssl_certificate      /usr/local/nginx/ssl/server-com.crt;
        ssl_certificate_key  /usr/local/nginx/ssl/server-com.key;
        return 404;
    }
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b37086-2c054.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b37086-2c054.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?