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 http://iguru.gr you can use it http://iguru.gr completely free and easy.
Below we will see how you can add LetsEncrypt to a Linux distribution running as a web server. Although all large web panels (cPanel or Plesk) have a small application of LetsEncrypt, you may need the following method because the panels mentioned above cost more.
Let's start:
We will need the git installed on the Linux distro you are using.
Ubuntu, Debian
sudo apt-get update 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 installation of the dependencies that are 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 protected] -d your domain.d
The command will tell LetsEncrypt that you are using Apache, giving your email, and the domains where 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 that the server has access to port 443 and that the correct path for SSL certifications is specified. 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.