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.
You need to turn off SSL Certificate verification in Postman's settings.
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.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With