0

I have one instance on Heroku with a auto generated certificate for mysite.com I have created a EC2 instance on AWS and generated a letsencrypt certificate for api.mysite.com

From the EC2 instance, if I execute

curl https://api.mysite.com/

I get the proper response-

From a browser or postman, I get

SSL Error: Certificate is not yet valid

My nginx config:

server {
    listen 443 ssl; 
    server_name api.mysite.com;
    include snippets/letsencrypt.conf;

    ssl_certificate /etc/letsencrypt/live/api.mysite.com/fullchain.pem; 
    ssl_certificate_key /etc/letsencrypt/live/api.mysite.com/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/api.mysite.com/chain.pem;

    ssl_dhparam /etc/ssl/certs/dhparam.pem;

    location / {
        include uwsgi_params;
        uwsgi_pass unix:/opt/app.sock;
    }
}

Any idea what the issue could be?

3
  • 1
    I'm assuming the computer you're testing from has a woefully out of sync clock Feb 13, 2022 at 9:07
  • lol, you are assuming right! Feb 13, 2022 at 9:13
  • @Ginnungagap Please don't post answers as comments.
    – vidarlo
    Feb 13, 2022 at 10:15

0

You must log in to answer this question.

Browse other questions tagged .