[Solved] Https showing not secure

.

My domain is:
https://www.stjornuljos.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):

You only issued the certificate for stjornuljos.is. You need to issue it for both stjornuljos.is and www.stjornuljos.is if you want the certificate to be valid for both names.

Since you didn't fill out any of the other questions, I can't provide any information on how to go about doing that for your system.

Í sent through this guide

I would recommend reviewing this part of Step 2 in that guide, this is what you’d need to do.

sudo certbot --apache -d example.com -d www.example.com

However, after that, you probably want to remove the original certificate. You can do this with certbot certificates to show you a list of the certificates on your server (probably just this one), and then use certbot delete to remove the “bad” one by name. Note that you will still receive a renewal reminder for this one, but you can safely ignore it as you won’t be using this certificate anymore.

EDIT: Do the delete after you get a new certificate. I think there may still be a bug where deleting first can cause issues with re-issuing a subsequent certificate.

Hello the delete does not work,
Please give me more information on what to do.

Could you please post the command you issued and the results of that commend? (Pretty hard to help while blindfolded. :slightly_smiling_face:)

Did you successfully issue the new certificate with both names to fix the original issue?

I managed to delete but now this comes when I run this command:

sudo certbot --apache -d stjornuljos.is -d www.stjornuljos.is

sudo certbot --apache -d stjornuljos.is -d www.stjornuljos.is
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running apache2ctl configtest.
Action ‘configtest’ failed.
The Apache error log may have more information.

AH00526: Syntax error on line 16 of /etc/apache2/sites-enabled/000-default-le-ssl.conf:
SSLCertificateFile: file ‘/etc/letsencrypt/live/stjornuljos.is/fullchain.pem’ does not exist or is empty

The apache plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError(“Error while running apache2ctl configtest.\nAction ‘configtest’ failed.\nThe Apache error log may have more information.\n\nAH00526: Syntax error on line 16 of /etc/apache2/sites-enabled/000-default-le-ssl.conf:\nSSLCertificateFile: file ‘/etc/letsencrypt/live/stjornuljos.is/fullchain.pem’ does not exist or is empty\n”,)

Ah, darn, I made my edit after you already read my post. I had overlooked the fact that deleting the certificate before creating the new one causes issues and changed my post to say to change the order of operations on this, but not in time it would seem.

I think the “best” way to fix this would be to remove the le-ssl config files and try again. Sorry about that!

1 Like

How do I delete them?

They’re just files, have you tried rm?

All working now please delete this tread

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