• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

Issue curl: (60) SSL: no alternative certificate subject name matches target host name

manojo

New Pleskian
Server operating system version
Ubuntu 22.04
Plesk version and microupdate number
18.0.60.1
Product version: Plesk Obsidian 18.0.60.1
OS version: Ubuntu 22.04 x86_64
Build date: 2024/04/21 18:00
Revision: fb95e147edf43efc98862c72507bfe703444b441

Server: Amazon LightSail

Issue: I cant CURL my api server that is hosted in the same server under different domain
1717196633964.png


What I did so far:

- Disabled the expired DST CA X3 root certificate. (Cert wasnt there) Resolved - cURL from PHP gives error 60
- Tried to curl from many other servers I own (Also localhost) And everything is working
- Reinstalled the certificate from the subdomain (Lets Encrypt) several times.
- Added TXT Registry to the api domain as additional step of installing certificate
- tried curl with -k flag, I could access the server but with a redirection message (http went forced to https, and I dont want run curl on http so this is not an option)
- Tried to install https://curl.haxx.se/ca/cacert.pem file into /etc/ssl/certs/
- Updated and upgraded the certs with the command `sudo update-ca-certificates --fresh` and got this warning message:
1717199461663.png

Any help will be appreciated. I just want to CURL my server
 
"no alternative certificate subject name matched", sounds strange, what about...
Code:
curl -vsl -o /dev/null https://apidev.[...]
[...]
subjectAltName: host "apidev.[...]" matched cert's "apidev.[...]"
 
Back
Top