I have two website with SSL on NGINX.
When
curl -I https://www.1111.com answer: https://1111.com
But when
curl -I https://www.2222.com answer: https://1111.com
curl -I https://2222.com answer https://2222.com
In nginx.conf i try change sequence of /import *.conf, and when i set 2222.com before 1111.com > answer changing the contrary.
1111.conf
server {
listen 80;
server_name 1111.com www.1111.com;
return 301 https://1111.com;$request_uri;
}
server {
listen 443 ssl http2;
server_name 1111.com;
root /usr/share/nginx/1111.com;
index index.php;
...
2222.conf is similar
How can i redirect all https:// www.* and http:// www.* on this website, and not the other ?