2

I followed the following steps to install an ssl-certificate on a website; https://www.digitalocean.com/community/tutorials/how-to-secure-apache-with-let-s-encrypt-on-centos-7. However, the website is still not trusted because the certificate is self-signed. I can't figure out what I'm doing wrong.

centos7 apache

Output after running sudo certbot --apache -d climatedata.ibs.re.kr -d www.climatedata.ibs.re.kr

    Saving debug log to /var/log/letsencrypt/letsencrypt.log
    Plugins selected: Authenticator apache, Installer apache
    Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
    Obtaining a new certificate
    Performing the following challenges:
    http-01 challenge for climatedata.ibs.re.kr
    http-01 challenge for www.climatedata.ibs.re.kr
    Waiting for verification...
    Cleaning up challenges
    Created an SSL vhost at /etc/httpd/sites-available/climatedata.ibs.re.kr-le-ssl.conf
    Deploying Certificate to VirtualHost /etc/httpd/sites-available/climatedata.ibs.re.kr-le-ssl.conf
    Enabling site /etc/httpd/sites-available/climatedata.ibs.re.kr-le-ssl.conf by adding Include to root configuration
    Deploying Certificate to VirtualHost /etc/httpd/sites-available/climatedata.ibs.re.kr-le-ssl.conf

    Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access.
    -------------------------------------------------------------------------------
    1: No redirect - Make no further changes to the webserver configuration.
    2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for
    new sites, or if you're confident your site works on HTTPS. You can undo this
    change by editing your web server's configuration.
    -------------------------------------------------------------------------------
    Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
    Enhancement redirect was already set.
    Enhancement redirect was already set.

   -------------------------------------------------------------------------------
    Congratulations! You have successfully enabled https://climatedata.ibs.re.kr and 
    https://www.climatedata.ibs.re.kr

    You should test your configuration at:
    https://www.ssllabs.com/ssltest/analyze.html?d=climatedata.ibs.re.kr
    https://www.ssllabs.com/ssltest/analyze.html?d=www.climatedata.ibs.re.kr
    -------------------------------------------------------------------------------

I'm still very new at this please let me know what logs (if any) I should supply and I'll add them to this post.

E Zeller
  • 23
  • 3

1 Answers1

2

It looks like certbot failed to write SSL certificate configuration for climatedata.ibs.re.kr. This virtual host is still serving a self-signed certificate. The other virtual host, www.climatedata.ibs.re.kr appears to be serving the Let's Encrypt certificate.

Perhaps those errors "Enhancement redirect was already set." have something to do with it.

In any case, I would just fix the Apache config myself.

I don't particularly trust certbot to get config editing right; it's too easy to have something that will confuse it.

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
  • Thank you for your help! I changed the `SSLCertificateFile`, `SSLCertificateKeyFile` and `SSLCertificateChainFile` in the /etc/httpd/conf.d/ssl.conf file restarted httpd and now it uses the correct certificate. For people using lets encript set it to the following: `SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem` `SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem` `SSLCertificateChainFile /etc/letsencrypt/live/example.com/chain.pem` – E Zeller Aug 04 '18 at 02:31