"Certificate file is not valid" when enabling "Apache SSL website"

If I try to access https:// in the browser, I get the following output in Firefox, Chrome and IE (http working fine):

Secure Connection Failed

After a virtualmin restore, I can’t seem to enable SSL through Edit Virtual Server -> Enabled Features -> Apache SSL website enabled? When I enable it, I get the following error:

Adding new SSL virtual website …
… certificate file is not valid : Line 32 does not look like PEM format

I’m currently researching the CLI process of this to give me further insight, but any pointers are very much appreciated to accelerate my learning. I’m not seeing much information in ‘/etc/httpd/httpd.conf’ Maybe there is a webmin configuration file that holds more information?

Hi …

Same issue here

Any solution please?

Does that happen with a newly requested cerfiticate?

Hi DrCarsonBeckett,

There was a problem with Dovecot … so I checked out “Edit Virtual Server -> Enabled Features -> Apache SSL website enabled?” to try to find the issue with Dovecot

Now I want to check in again and enable “Apache SSL website enabled”

When I try to enable it this message appear to me:

“Adding new SSL virtual website …
… certificate file is not valid : Line 32 does not look like PEM format”


This is what was happening in my situation as well. I was restoring a Virtualmin configuration using the back-up and restore feature. I came from CentOS 7.6 to a new CentOS 8.2 server. Everything worked and integrated good. I had to disable mod_php to resolve an error and then I was just left with the SSL issue.


Still you have not find any solution to fix this issue?

I hope somebody help us

@SirDoyle To save time, I reinstalled a fresh copy of Virtualmin on my CentOS 8.2 server. I had made a hand written notebook record of every setting I adjusted along the way of my install to help me memorize the Virtualmin system. Luckily because of that, I was able to follow my list and set everything back up how I had it.

1 Like

I had an issue ones where an backup from an “older” version disrupted the newly installed version.
Can you try to request a cerfiticate directly with certbot for that domain?

@SirDoyle If I wasn’t in such a rush I would have done what @DrCarsonBeckett recommended. Here’s a great link with adjustable instructions based on your web sever software and operating system.

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