Debug School

rakesh kumar
rakesh kumar

Posted on • Updated on

SSL Error: no alternative certificate subject name matches target

SSL Error: no alternative certificate subject name matches target

Error

.ERROR: cURL error 51: SSL: no alternative certificate subject name matches target host name 'www.myhospitalnow.com' (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) {"exception":"[object] (GuzzleHttp\\Exception\\RequestException(code: 0): cURL error 51: SSL: no alternative certificate subject name matches target host name 'myhospitalnow.com' (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) at /opt/lampp/htdocs/myhospitalnow/mhn-admin-ms/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:201
Enter fullscreen mode Exit fullscreen mode
HOSPITAL_MANAGEMENT_BASE_URL . HOSPITAL_M_OAUTH_TOKEN_URL: https://myhospitalnow.com/hospitals/oauth/token
Enter fullscreen mode Exit fullscreen mode
[2023-02-25 08:08:11] production.INFO: HOSPITAL_MANAGEMENT_BASE_URL . HOSPITAL_M_OAUTH_TOKEN_URL: https://myhospitalnow.com/hospitals/oauth/token
[2023-02-25 08:08:11] production.INFO: HOSPITAL_M_GRANT_TYPE: client_credentials

[2023-02-25 08:08:11] production.ERROR: cURL error 51: SSL: no alternative certificate subject name matches target host name 'myhospitalnow.com' (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) {"exception":"[object] (GuzzleHttp\\Exception\\RequestException(code: 0): cURL error 51: SSL: no alternative certificate subject name matches target host name 'myhospitalnow.com' (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) at /opt/lampp/htdocs/myhospitalnow/mhn-admin-ms/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:201)
Enter fullscreen mode Exit fullscreen mode

Solution

wrong

Image description

HOSPITAL_MANAGEMENT_BASE_URL . HOSPITAL_M_OAUTH_TOKEN_URL: https://myhospitalnow.com/hospitals/oauth/token
Enter fullscreen mode Exit fullscreen mode

Right

HOSPITAL_MANAGEMENT_BASE_URL . HOSPITAL_M_OAUTH_TOKEN_URL: https://www.myhospitalnow.com/hospitals/oauth/token
Enter fullscreen mode Exit fullscreen mode

in env

Image description

Image description

how-to-apply-new-certificates-to-xampp-server

Top comments (0)