I am trying to tát hit a server running on port 8080 of an AWS EC2 instance with a POST request.
This is the response that POSTMAN gives mạ 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 tát be a NodeJS and certificates issue.
I am not using Node and I don't know what to tát tự with certificates? (I don't know much about how or why I would need them), but I have .pem tệp tin which helped mạ SSH into the EC2 instance.
How can I resolve this error in Postman?
Also, if it matters, it is a Graphql request.
asked Aug 31, 2020 at 20:29
Karan SinghKaran Singh
1,1643 gold badges13 silver badges32 bronze badges
6
You need to tát turn off SSL Certificate verification in Postman's settings.
Bhargav Rao
52k29 gold badges126 silver badges141 bronze badges
answered Mar 23, 2021 at 13:50
1
It looks lượt thích you have created a dns name pointing to tát the AWS generated public dns name for ec2 instance. It's not the correct way. You need to tát setup an A
record and point it to tát 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 tát the HTTPS port (usually 443) will kiểm tra whether the tên miền 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.
answered Aug 31, 2020 at 20:35
1
I encountered the same issue and tried to tát add the Host in the header and it works. Host:EC2 generated public DNS name (chat.my-app.app)
answered Dec 24, 2020 at 4:25
十一城城主十一城城主
311 bronze badge