Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hostname/IP does not match certificate's altnames: POSTMAN

I am trying to hit a server running on port 8080 of an AWS EC2 instance with a POST request.

This is the response that POSTMAN gives me when I send the request:

Error: Hostname/IP does not match certificate's altnames: Host: some-address.compute.amazonaws.com. is not in the cert's altnames: DNS:chat.my-app.app

I tried looking for it but this seems to be a NodeJS and certificates issue.

I am not using Node and I don't know what to do with certificates? (I don't know much about how or why I would need them), but I have .pem file which helped me SSH into the EC2 instance.

How can I resolve this error in Postman?

Also, if it matters, it is a Graphql request.

like image 474
Karan Singh Avatar asked Aug 31 '20 20:08

Karan Singh


3 Answers

You need to turn off SSL Certificate verification in Postman's settings.

enter image description here

like image 107
Jonathan Kibet Avatar answered Sep 25 '22 11:09

Jonathan Kibet


It looks like you have created a dns name pointing to the AWS generated public dns name for ec2 instance. It's not the correct way. You need to setup an A record and point it to the public ip address of the ec2 instance.

When you have a CNAME created against the EC2 generated public dns name (chat.my-app.app) and access the URL over SSL (https://chat.my-app.app), the process (possibly nginx in your case) that listens to the HTTPS port (usually 443) will check whether the domain name that you used (chat.my-app.app) is listed as one of alternate domains listed in the SSL certificate that the amazon generated dns name uses.

like image 23
Arun Kamalanathan Avatar answered Sep 21 '22 11:09

Arun Kamalanathan


I encountered the same issue and tried to add the Host in the header and it works. Host:EC2 generated public DNS name (chat.my-app.app)

like image 41
十一城城主 Avatar answered Sep 22 '22 11:09

十一城城主