I have domains likes
- app.something.com
- app.uk.something.com
There is no issue when I access https://app.uk.something.com/login
or other urls with path behind, it returns the site with correct certificate issued for app.uk.something.com
.
However, when I access root, https://app.uk.something.com/
, it redirects to https://app.uk.something.com:8443
and gave an error
This server could not prove that it is app.uk.something.com;
its security certificate is from app.something.com.
This may be caused by a misconfiguration or an attacker intercepting your connection.
When I checked the cert, it uses the one assigned for app.something.com
.
I used acme.sh to issue certs.
What I have done
actually, there are other sites likeapp.us.something.com
, they works fine, so for nginx, I just copied their config, replaceserver_name
,cert
,key
for new one. Everything is working accordingly except the root now.