LetsEncrypt installation on your Linux web server

LetsEncrypt is one certificate authority which has an automatic client for adding free SSL. This in short means that you can secure your websites completely free of charge very easily with one command. So from https://iguru.gr you can use https://iguru.gr completely free and easy.

Below we will see how you can add LetsEncrypt to a Linux distribution that runs as a web server. Although all large web panels (cPanel or Plesk) have a micro of LetsEncrypt, you may need the following method because the panels we mentioned above cost.

LetsEncrypt

Let's start:
We will need the git installed on the Linux distro you are using.

Ubuntu, Debian

sudo apt-get 
sudo apt-get install git-all

RedHat, CentOS

sudo yum update sudo yum install git-all

Installation

Now that we have the git in our system we will clone the LetsEncrypt repo.

mkdir ~ / src cd ~ / src git clone https://github.com/letsencrypt/letsencrypt cd letsencrypt sudo chmod g + x letsencrypt-auto ./letsencrypt-auto

Give some time for the update, and the of the dependencies needed.

Let's use LetsEncrypt

After installing Let's Encrypt we can issue certificates in snap.

For Apache2

Stop the apache2 service.

Then run LetsEncrypt:

./letsencrypt-auto --apache --email=name@to-email.you -d your domain.d

The command will "tell" LetsEncrypt that you are using Apache, give your email, and so on in which you need certificates. You can use any domain you want after the -d flag and the LetsEncrypt application will start the process automatically.

For Nginx

LetsEncrypt and Nginx are working fine in 2020. About two years ago they were working experimentally, but at the moment there does not seem to be any problem.

./letsencrypt-auto certonly --email=name@your-email. -d your.domain -d SUB.your.domain

The command will generate a certificate in your /etc/letsencrypt/live/domain.directory.

To tell nginx that your site now uses SSL, you need to edit the Nginx site config file. For example:

sudo nano / etc / nginx / sites-enabled / default

In the config file, make sure the server has on port 443 and indicate the correct path for SSL certifications. Your config should look like this:

server {listen 443; server_name to your domain SUB to your domain? root / usr / share / nginx / www; index index.html index.htm; ssl on; ssl_certificate /etc/letsencrypt/live/τοdomain.σας/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/τοdomain.σας/privkey.pem; }

After saving the nano do a restart on Nginx, and you are ready.

iGuRu.gr The Best Technology Site in Greecefgns

every publication, directly to your inbox

Join the 2.087 registrants.

Written by giorgos

George still wonders what he's doing here ...

Leave a reply

Your email address is not published. Required fields are mentioned with *

Your message will not be published if:
1. Contains insulting, defamatory, racist, offensive or inappropriate comments.
2. Causes harm to minors.
3. It interferes with the privacy and individual and social rights of other users.
4. Advertises products or services or websites.
5. Contains personal information (address, phone, etc.).