Apache Config test Failed

Hello,

I installed letsencrypt with certbot last week on my server (Debian 8.7/Apache 2.4). The installation was sucessfull.

Today a week later I need to change the Apache configuration file for another reason and when I run the command to test the config (apachectl config test) I got this error:

Could not open configuration file /etc/letsencrypt/options-ssl-apache.conf: No such file or directory

Indeed the existing file is options-ssl-apache.conf**.gz**

And it seems that it’s the case for all the certificate files also (*.pem => *.pem.gz), every file use the gz extension. I didn’t change anything after the installation.

Do I need to rename the files manually to their original extension?

Thanks for the help,

Matthieu

Renaming obviously isn't going to help if the files were actually gzipped. You can check with the application file what for kind of file you're dealing with. If it says something like "gzip compressed data", you'd need to use gunzip to unzip the files. If it says something like "ASCII text", you just need to rename the files.

Also, why did everything become gzipped? That's not something certbot would do..

Thanks @Osiris for the help. When I run the file command I got this:

options-ssl-apache.conf.gz: gzip compressed data, was "options-ssl-apache.conf", last modified: Sun Feb 26 16:20:25 2017, from Unix

I’m not an Unix expert but is that normal that I can vi the file and see the text normally even if it’s supposed to be a compressed data file? I.e. vi options-ssl-apache.conf.gz and I can read the file normally.

I remember now that I run a command to compress the folder to do a backup … :frowning: My mistake. Somehow I must have renamed those files by mistake … I’m going to reverse this manually.

Sorry, at the end it’s the wrong forum, will go the linux n00b one :slight_smile:

Matthieu

1 Like

Yes, vim is fancy and smart enough to gunzip the file for you to read it. It also gzips it again after closing I recon.

Just use gunzip to decompress everything and you'll be fine.

1 Like

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