Instructions for installing and configuring Let’s Encrypt in OpenLiteSpeed

Tutorials 0 lượt xem
This article is part 4 of 4 in the OpenLiteSpeed ​​User Guide series

We continue with the series of articles on building WordPress websites on OpenLiteSpeed ​​web server.

In the previous post you completed the WordPress installation .

Next mission:

We will install and configure the Let’s Encrypt SSL certificate in OpenLiteSpeed.

These days the importance of SSL certificates is not in dispute.

If you’re building a website from scratch, installing a free SSL certificate like Let’s Encrypt is almost a must.

Install Certbot

The easy way to install Let’s Encrypt certificate on VPS is to use Certbot Client.

On CentOS 7, Certbot is available at the EPEL Repository. You just need to enable it with the following command:

Ubuntu you need to configure Certbot PPA with the following command:

You can now install Certbot

CentOS:

Ubuntu:

Create a Let’s Encrypt certificate for your domain

You create a Let’s Encrypt certificate for your domain with the following command:

Enter your email address and answer when the script asks as follows:

install Lets Encrypt in OpenLiteSpeed ​​webserver 1

You will see a list of pem files located in the directory /etc/letsencrypt/live/your_domain/

cert.pem – SSL certificate of your domain

chain.pem – CA certificate

fullchain.pem – Combined certificate, includes domain and CA certificate.

privkey.pem – Private key

You will need to provide the path to the fullchain.pem and privkey.pem files in the OpenLiteSpeed ​​configuration.

Configure Let’s Encrypt SSL in OpenLiteSpeed

As usual visit WebAdmin: http://your_ip_address:7080/

Go to Listeners and click the Add button to add a new listener:

Install Lets Encrypt in OpenLiteSpeed ​​2 web webserver

Enter the Listener Name, Port, Secure information as below:

Install Lets Encrypt in OpenLiteSpeed ​​3 . webserverClick the Save button to save the configuration. Still in the Listener you just created. Click the General Tab. Click the Add button in Virtual Host Mappings .

Install Lets Encrypt in OpenLiteSpeed ​​4 . webserver

Map virtual host with your domain:

Install Lets Encrypt in OpenLiteSpeed ​​5 webserver

Click the Save button to save the configuration. Then switch to the SSL tab. Click the Edit button in the SSL Private Key & Certificate section .

Install Lets Encrypt in OpenLiteSpeed ​​6 . webserver

Enter the path for the private key and certificate file as follows:

Private Key File /etc/letsencrypt/live/elegantjava.info/privkey.pem
Certificate File /etc/letsencrypt/live/elegantjava.info/fullchain.pem

Install Lets Encrypt in OpenLiteSpeed ​​7 webserver

Click the Save button. Click the Edit button in the SSL Protocol section.

Install Lets Encrypt in OpenLiteSpeed ​​8 . webserver

Select all protocols except SSL v3.0 as below. Then click the Save button.

Install Lets Encrypt in Webserver OpenLiteSpeed ​​9

Restart OpenLiteSpeed ​​by clicking the Graceful Restart button.

At Dashboard make sure that the listener you just created has run successfully as below: (blue icon)

Install Lets Encrypt in OpenLiteSpeed ​​webserver 10

In WordPress, you install and activate Really Simple SSL .

Now we test the certificate again with the SSL Lab Server Test. 

Install Lets Encrypt in OpenLiteSpeed ​​11 . webserver

OpenLiteSpeed ​​supports the trendy HTTP/2 protocol. But still want to double check to be sure. As you can see below, your website is running over HTTP/2 protocol.

Install Lets Encrypt in OpenLiteSpeed ​​webserver 12

Renew Let’s Encrypt certificate

As you know Let’s Encrypt certificate expires after 90 days. You need to create an auto-renew cron job like this:

Note: if you get the error nano command not found. You just need to install nano editor (CentOS: yum install nano, Ubuntu: apt-get install nano)

Paste the following line at the end of the file.

Run the renewal order at 3:15 am. If the certificate has not expired it does nothing.

You see, installing and configuring the Let’s Encrypt certificate is not too complicated.

If you have any problems, leave a comment below.

View articles in the series

Previous Part: Instructions for installing WordPress in OpenLiteSpeed ​​web server

Bài viết liên quan