Cannot upload artifacts via CURL to Nexus Container once HTTPS is enabled

Running Nexus v3:3.30.0 container with Podman 1.4.2-stable2. Once the container is successfully up and running, I’m able to use curl to upload and download artifacts (ISOs) with no issues along with curl -l -v command returns the web page via text output.

However once I enable HTTPS using the following documentation, Inbound SSL - Configuring to Serve Content via HTTPS (Configuring SSL), when testing again with curl against the URL, I’m getting the following error.

[user_a@host_a]$ curl -l -v

    Rebuilt URL to:
    Connected to ( port 8081 (#0)
    ALPN, offering h2
    ALPN, offering http/1.1
    successfully set certificate verify locations:
      CAfile: /etc/pki/tls/certs/ca-bundle.crt
      CApath: none
    TLSv1.3 (OUT), TLS handshake, Client hello (1):
    TLSv1.3 (IN), TLS handshake, Server hello (2):
    TLSv1.2 (IN), TLS handshake, Certificate (11):
    TLSv1.2 (IN), TLS handshake, Server key exchange (12):
    TLSv1.2 (IN), TLS handshake, Server finished (14):
    TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
    TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
    TLSv1.2 (OUT), TLS handshake, Finished (20):
    TLSv1.2 (IN), TLS handshake, Finished (20):
    SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
    ALPN, server did not agree to a protocol
    Server certificate:
     subject: C=XX; ST=XX; L=XXXXXXXX; O=XX-XX; OU=XXX;
     start date: Nov 28 19:49:21 2021 GMT
     expire date: Nov 28 19:49:21 2023 GMT
     subjectAltName does not match
        SSL: no alternative certificate subject name matches target host name ''*
    Closing connection 0
    TLSv1.2 (OUT), TLS alert, close notify (256):
    curl: (51) SSL: no alternative certificate subject name matches target host name ''

I’ve also tried to use the IP Address above for the DNS entries when creating the .jks file and still get errors.

The error message says the certificate doesn’t match the host.

I’m still learning my way around when it comes to certs.

However the DNS alias that I put in the cert request, I placed into /etc/hosts along with the IP address assigned to the container and that fixed the issue.