![](https://seccdn.libravatar.org/avatar/e6bc4b5458f9686f6bb7cf02bdd6e1da.jpg?s=120&d=mm&r=g)
On 11/10/18 21:27, Knurpht-openSUSE wrote:
Op donderdag 11 oktober 2018 22:18:55 CEST schreef Paul Groves:
OK so I have now got a problem with certbot.
I have already generated an SSL cert for www.mysite.com using the command: sudo certbot --apache -d www.mysite.com
And this has worked perfectly, however I have a site alias of mysite.com and rewrite to always navigate to www.mysite.com
Now as I expected when I go to mysite.com I get a bad domain error and it says certificate only valid for www.mysite.com
So I used the command off the letsencrypt website: sudo certbot --apache -d mysite.com -d www.mysite.com
and I get the following error (note: I replaced my account no. with stars): Obtaining a new certificate An unexpected error occurred: The server experienced an internal error :: Error retreiving account "https://acme-v02.api.letsencrypt.org/acme/acct/*****"
Can anyone tell me what I am doing wrong here?
Thanks You can use -d www.mysite.com -d mysite.com -d blah.mysite.com and so on
OK thanks I have sorted it, I was putting mysite.com first (which is the
site alias).
I had to put www.mysite.com first. this now worked:
certbot --apache -d www.mysite.com -d mysite.com
now I can get on via ssl easily. Now a more trivial question.
I have set up a second virtualhost for the same site which is http only
and I wish to redirect it to https: