Probably basic configuration q - Unknown issuer - Apache on Centos 6

Hi folks, I’m sorry this is probably an easy question but I can’t seem to figure out a definitive answer and I’ve never had to configure https/SSL before. Apache 2.2.15 on CentOS 6.8.

When I generate my certificate I do it for www.(example) and (example), but my server has been set up by the university I work with (using some custom scripts) and is therefore set up on the local network as (name).(dept).(uni) The errors are fairly obvious:

(example) uses an invalid security certificate.

The certificate is not trusted because it is self-signed.
The certificate is not valid for the name (example)

My questions, and thank you in advance! -

Will the self-signed error go once Centos and Apache are set up correctly?

As well as changing /etc/sysconfig/network, I need to do something with /etc/hosts but I’m not sure what the right formatting would be? I’ve tried changing both of these and restarting the network service but hostname is still (name).(dept).(uni) - what else do I need to change, and will this then effect the local network address? Is there any way I can do it so that any IT tasks that are set up can still access (name).(dept).(uni) Thank you again.

Hi @kab, I'm not quite sure what you're referring to in terms of "set up on the local network as" here. I guess you're saying that the version is the canonical version assigned by your university, and also the internal hostname that your server gets from DHCP, but not the name that you prefer to use when accessing the server?

It sounds like the error that you're seeing means that the cert that you got from Let's Encrypt is not yet installed properly. Once it's installed, the certificate should match.

This part is kind of unclear to me in terms of whether you want to change how your computer thinks of itself or how other computers on the LAN refer to it. There's not usually a problem with different users referring to the same server under different names (for example, at big hosting providers a single server can answer requests for thousands of different sites, often using just a single IP address which each of those site's domain names resolves to in the DNS). While there can be a difficulty with certificate mismatches, I assume that nobody is currently accessing any HTTPS service on under that name, right?

Thanks for your reply, and sorry that I'm so confused about how this should work! I'll redact the actual details later but for now it's probably easier if I use the actual names. The hosting server is called kelpie and is hosted on the subdomain - it uses DNS. The site is so my command is: ./certbot-auto --apache -d -d

The SSL report is:

SSL Report: (
Certificate name mismatch
Try these other domain names (extracted from the certificates):

Basically I'm trying to figure out where the certificate generation is getting kelpie from instead of I'm thinking now I've been entirely confused in changing CentOS settings, and it's actually something in Apache? I don't know what set-up was done before I could access the server, but apache is serving out some pages that are under a, nothing with https however, and nothing that I need to keep.

Thank you so much again for any help you can give and sorry about my lack of understanding.

Hi @kab,

The reason for the trouble is that your server is configured to use an existing certificate for, which is self-signed (not issued by a publicly-trusted CA) and does not mention at all. The existing certificate could not have been created by Certbot or as a direct result of your attempt to use Certbot, but must have existed before.

What’s more, assuming that you’ve been trying to set this up today or in the last few days, you’ve apparently so far not succeeded in getting a cert from Let’s Encrypt at all

So Certbot probably didn’t run or didn’t succeed for some reason, and the problems that you’re seeing relate to that, rather than to the existence of different names that refer to the same server.

Can you tell us about the output or logs that were produced when you tried to run certbot-auto?

Thanks @schoen, the basic certbot output indicated everything was successful:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Cert is due for renewal, auto-renewing...
Renewing an existing certificate
Performing the following challenges:
tls-sni-01 challenge for
tls-sni-01 challenge for
Waiting for verification...
Cleaning up challenges
Generating key (2048 bits): /etc/letsencrypt/keys/0001_key-certbot.pem
Creating CSR: /etc/letsencrypt/csr/0001_csr-certbot.pem
Deploying Certificate to VirtualHost /etc/httpd/conf.d/
Deploying Certificate to VirtualHost /etc/httpd/conf.d/
Your existing certificate has been successfully renewed, and the new certificate
has been installed.
The new certificate covers the following domains:

The debug logs don't indicate anything failing, anything referencing the server or uni subdomain. The previous certificate expired today iirc, and had the same issue.

ETA: I don't see any certificates for kelpie, or any apache config for it, but I do see config for opencollections.

That’s very mysterious. Do you have some certificates in /etc/letsencrypt/live?

Yeah, there’s an opencollections directory with cert.pem, chain.pem, fullchain.pem and privkey.pem

Hmmm, could you run

openssl x509 -in cert.pem -text -noout

and paste the results here? The only relevant cert I can see on is

which seems to be a previous (expired) cert for this domain, not one that you would have gotten via a successful renewal.

Yeah I saw that previous certificate, but I don't understand why it hasn't updated since I used the same command and got the same issues with the expired one!

The command output:

Version: 3 (0x2)
Serial Number:
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=US, O=Let's Encrypt, CN=Let's Encrypt Authority X3
Not Before: Feb 1 22:46:00 2017 GMT
Not After : May 2 22:46:00 2017 GMT
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Exponent: 65537 (0x10001)
X509v3 extensions:
X509v3 Key Usage: critical
Digital Signature, Key Encipherment
X509v3 Extended Key Usage:
TLS Web Server Authentication, TLS Web Client Authentication
X509v3 Basic Constraints: critical
X509v3 Subject Key Identifier:
X509v3 Authority Key Identifier:
Authority Information Access:
CA Issuers - URI:
X509v3 Subject Alternative Name:,
X509v3 Certificate Policies:
User Notice:
Explicit Text: This Certificate may only be relied upon by Relying Parties and only in accordance with the > Certificate Policy found at Policy and Legal Repository - Let's Encrypt
Signature Algorithm: sha256WithRSAEncryption

I really appreciate this, thank you!

I also see that the certs are now on - and

OK! So it looks like you did get the new certs issued successfully, but your web server is simply not configured to use them. (And maybe I was misled by a processing delay.) This is very possible because the web server will have a configuration file of some kind pointing to particular cert files and then it will use those in connection with inbound requests.

I see that your server is running Apache, so perhaps you could try

cd /etc/apache2 grep -r SSLCertificate .

That should show which virtual hosts are using a certificate and where that certificate is coming from (I’m going to guess it will turn out to be somewhere other than /etc/letsencrypt).

That’s it! Thank you a million times! in ssl.conf I thought those lines were still commented out, but they were pointing to a self-signed openssl certificate I knew nothing abou! Thank you so much again, and sorry it turned out to be something very simple!

That’s great news! Sorry for the confusion due to the slow updates, and I’m glad things are working properly now.

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