Error code: ssl_error_bad_cert_domain aws s3

I have installed an certificate, I used this tutorial https://docs.bitnami.com/aws/how-to/generate-install-lets-encrypt-ssl/ to generate and install the certificate and then this tutorial to enable the configuration https://docs.bitnami.com/general/components/apache/#how-to-enable-https-support-with-ssl-certificates , I use apache version < 2.4.8 with bitnami (in aws server), but when I access to this route ( https://blogvideo.gallereplay.com.s3.amazonaws.com/cinemagraphs/Mobile - Meditation/cinemagraph.m4v ) I have an error Error code: ssl_error_bad_cert_domain The certificate is only valid for the following names:
*.s3.amazonaws.com, s3.amazonaws.com.
I think I need a subdomain certificate, but I don’t know how install, please, can you help me?

Hi,

I have a few questions, but please fill this form first..

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command:

It produced this output:

My web server is (include version):

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

Here are the questions:

  1. Do you use binami to install/ configure/deploy the server for you?
  2. Are you using AWS EC2 instance?
  3. Is your domain name "blogvideo.gallereplay.com" pointed to EC 2 or S3.
  4. Which domain are you trying to acquire an certificate?

Thank you

Form:
My domain is: blog.gallereplay.com
My web server is (include version): Apache/2.4.29
The operating system my web server runs on is (include version): Ubuntu 16.04.3 LTS
My hosting provider, if applicable, is: AWS
I can login to a root shell on my machine (yes or no, or I don’t know): yes
I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

Questions:
Do you use binami to install/ configure/deploy the server for you? I don’t know, I don’t installed or configurated this server
Are you using AWS EC2 instance? yes
Is your domain name “blogvideo.gallereplay.com” pointed to EC 2 or S3.EC2, in S3 I storage the images and videos
Which domain are you trying to acquire an certificate? the error is when I try to access a video or a pic, in this URL https://blogvideo.gallereplay.com.s3.amazonaws.com/cinemagraphs/thomas brand - reflector/cinemagraph.jpg so I think I need to add a certificate to blogvideo.gallereplay.com.s3.amazonaws.com

Hi,

For some reason, your S3 bucket is forcing you to use http://blogvideo.gallereplay.com.s3.amazonaws.com instead of http://s3.amazonaws.com/blogvideo.gallereplay.com.. and i don't have a way to resolve this.

S3 doesn't grant you a certificate on subdomains except *.s3.amazonaws.com & s3.amazonaws.com.

So if you want to use the S3 bucket regularly, here are two options:

  1. Find a way to use http://s3.amazonaws.com/blogvideo.gallereplay.com instead of http://blogvideo.gallereplay.com.s3.amazonaws.com
  2. Setup a CloudFront Instance with your domain name (e.g. blogvideo-cdn.gallereplay.com) and use this instead of the S3 url. (Please note this will incur extra cost)
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.