Setting Up HTTPS with Let’s Encrypt SSL Certificate For Nginx on RHEL/CentOS 7/6

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Matei Cezar

I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

16 Responses

  1. Henrik Jakobsen says:

    Fantastic tutorial, easy to follow and very well explained.

    I had 2 issue:

    1. I am on a windows machine and I made the cert-renew script in notepad++, but it didn’t work. Then I changed the EOL conversion setting to Unix (LF) and it worked. It’s under Edit – EOL Conversions.
    2. Using vim for the crontab editing, but I followed a guide here to figure it out:

  2. Ashok says:

    I am getting this error after step 8.

    FailedChallenges: Failed authorization procedure. (http-01): urn:ietf:params:acme:error:dns :: DNS problem: NXDOMAIN looking up A for

  3. Ivo says:

    Thank you very much! Only got one problem to solve, “requested domain is not a FQDN because it contains an empty label.”

    • Matei Cezar says:

      Check the DNS records for special allowed characters, especially the A or PTR records, if any!

      • Ivo says:

        Thanks, I solved it by using --domains $domain instead of “${domain_list}“. My only problem now is that I get folders like I just want to replace the existing one. Is there a solutions for this behavior?

  4. Ronald D. Ferrell says:

    Thanks, This was VERY helpful.

  5. timeless says:

    two of your quotes are fancy quotes instead of plain quotes:
    > Add following lines to cert-renew file.
    >> webpath=’ /usr/share/nginx/html/’

  6. Sandeep says:

    This is one of THE most complete and super simple tutorial I’ve seen.
    Thanks a ton!!

  7. Rahul Soni says:

    Thanks for the detailed instructions. It helped, but I got stuck in a couple of steps. Hence, I wrote another article which shares an alternate way of using LetsEncrypt with Nginx on AWS.

  8. Waqass says:

    The best article for installing the SSL certificate. The best part is that it also takes the whole articles in easy steps with pictures and later on further guides on how to secure and install the cron for it. Excellent work.!

  9. Sajid Hussain says:

    Wow! – Nice article and detailed information.

  10. Gaboury says:

    Thanks for this how-to. I want to add it is possible to use systems timer feature to trigger the renewal.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.