Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: preg_match(): Unknown modifier '-' in /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php on line 783

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794

Warning: Cannot modify header information - headers already sent by (output started at /home/akl1986/public_html/support/wp-content/plugins/redux-framework/redux-core/inc/extensions/metaboxes/class-redux-extension-metaboxes.php:783) in /home/akl1986/public_html/support/wp-includes/rest-api/class-wp-rest-server.php on line 1794
{"id":2746,"date":"2019-12-14T19:03:15","date_gmt":"2019-12-14T19:03:15","guid":{"rendered":"https:\/\/support.aklwebhost.com\/?post_type=manual_kb&p=2746"},"modified":"2019-12-14T19:03:15","modified_gmt":"2019-12-14T19:03:15","slug":"setup-letsencrypt-on-linux","status":"publish","type":"manual_kb","link":"https:\/\/support.aklwebhost.com\/knowledgebase\/setup-letsencrypt-on-linux\/","title":{"rendered":"Setup LetsEncrypt On Linux"},"content":{"rendered":"

LetsEncrypt<\/strong><\/span><\/a>\u00a0is a certificate authority with an automated client. In short, this means that you can secure your websites at no cost. That’s right, you can go from\u00a0http:\/\/yourdomain.com<\/em>\u00a0to\u00a0https:\/\/yourdomain.com<\/em>\u00a0for free. Note though, it’s at the discretion of LetsEncrypt to issue you a certificate.<\/p>\n

Getting started<\/h3>\n

You will need\u00a0git<\/code>\u00a0installed on your Linux distro.<\/p>\n

Ubuntu, Debian<\/h4>\n
sudo apt-get update\r\nsudo apt-get install git-all\r\n<\/code><\/pre>\n

RedHat, CentOS<\/h4>\n
sudo yum update\r\nsudo yum install git-all\r\n<\/code><\/pre>\n

Installation<\/h3>\n

Now that\u00a0git<\/code>\u00a0is installed on your system, you can clone the\u00a0LetsEncrypt repo<\/a><\/strong><\/span>.<\/p>\n

mkdir ~\/src\r\ncd ~\/src\r\ngit clone https:\/\/github.com\/letsencrypt\/letsencrypt\r\ncd letsencrypt\r\nsudo chmod g+x letsencrypt-auto\r\n.\/letsencrypt-auto\r\n<\/code><\/pre>\n

Give it a little bit of time to update, install any missing dependencies as needed.<\/p>\n

Using LetsEncrypt<\/h3>\n

Once Let’s Encrypt has finished installing, you can issue certificates in a snap.<\/p>\n

For Apache2<\/h4>\n

Stop the\u00a0apache2<\/code>\u00a0service.<\/p>\n

Then, run LetsEncrypt:<\/p>\n

.\/letsencrypt-auto --apache --email=YOUREMAIL@YOURDOMAIN.COM -d YOURDOMAIN.COM -d SUB.YOURDOMAIN.COM -d ANYDOMAIN.YOUWANT.NET\r\n<\/code><\/pre>\n

This command calls LetsEncrypt, telling it that we are using Apache so that it can automate the install process. It notifies LetsEncrypt of our email address, and tells them the domains for which we would like certificates. You can use any domain you want after the\u00a0-d<\/code>\u00a0flag because that tells LetsEncrypt “this person wants a cert for this domain”. LetsEncrypt will automate this whole process and add the proper lines of code to the config file for your domain.<\/p>\n

For Nginx<\/h4>\n

LetsEncrypt for Nginx is very experimental. Use it at your own risk (make a backup your configuration first).<\/p>\n

.\/letsencrypt-auto certonly --email=YOUREMAIL@YOURDOMAIN.COM -d YOURDOMAIN.COM -d SUB.YOURDOMAIN.COM \r\n<\/code><\/pre>\n

This will generate a certificate in the following directory\u00a0\/etc\/letsencrypt\/live\/YOURDOMAIN.COM<\/code>.<\/p>\n

To get the traffic switched over to using SSL, you will need to edit your Nginx site config file. For example:<\/p>\n

sudo nano \/etc\/nginx\/sites-enabled\/default\r\n<\/code><\/pre>\n

In the config file, make sure that the server is listening on port 443 and that the SSL certificate locations are properly defined. Your config file should resemble the following:<\/p>\n

server {\r\n    listen 443;\r\n    server_name yourdomain.com sub.yourdomain.com;\r\n\r\n    root \/usr\/share\/nginx\/www;\r\n    index index.html index.htm;\r\n\r\n    ssl on;\r\n    ssl_certificate \/etc\/letsencrypt\/live\/yourdomain.com\/fullchain.pem;\r\n    ssl_certificate_key \/etc\/letsencrypt\/live\/yourdomain.com\/privkey.pem; \r\n}\r\n<\/code><\/pre>\n

Save the file, restart Nginx, and you’ll be ready to go!<\/p>\n

Enjoy your new secure website!<\/p>\n

\n
\n

Want to contrib<\/h2>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","manualknowledgebasecat":[109,242],"manual_kb_tag":[416],"_links":{"self":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2746"}],"collection":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb"}],"about":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/types\/manual_kb"}],"author":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/comments?post=2746"}],"version-history":[{"count":1,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2746\/revisions"}],"predecessor-version":[{"id":2747,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb\/2746\/revisions\/2747"}],"wp:attachment":[{"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/media?parent=2746"}],"wp:term":[{"taxonomy":"manualknowledgebasecat","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manualknowledgebasecat?post=2746"},{"taxonomy":"manual_kb_tag","embeddable":true,"href":"https:\/\/support.aklwebhost.com\/wp-json\/wp\/v2\/manual_kb_tag?post=2746"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}