CWP7 SSL error? How can hostname install Letsencrypt free certificate?

How to install Letsencrypt SSL free SSL certificate for CWP7 hostname?

CWP7 SSL error? How can hostname install Letsencrypt free certificate?

  • 这 是 CWP Control Panel AutoSSL guide to automatically install Letsencrypt free SSL certificates.

If the CWP7 SSL error message "cwpsrv.service failed.", please browse the solution of the following tutorial▼

How to change the hostname in CWP?

Suppose your hostname is server.yourdomain.com

  1. First, create a subdomain in the CWP backend:server.yourdomain.com
  2. Add an A record in DNS, the subdomain points to yourLinuxServer IP address.
  3. Go to → CWP Settings → Change Hostname in the left menu of cwp.admin to save your hostname.
  • SSL will be installed automatically, the only condition is that you set up a DNS A record for the hostname.
  • If you don't have an A record for the hostname, CWP will install a self-signed certificate.
  • Note that the hostname should be the subdomain and not the main domain.

For http:// to https:// redirection, you can/usr/local/apache/htdocs/.htaccessCreate this htaccess file:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Let's Encrypt is a certificate authority that launched on April 2016, 4, with the aim of eliminating the current manual creation, verification, signing, installation and updating of certificates for secure websites.

Hostname/FQDN Install Letsencrypt SSL Certificate

What does FQDN mean??

  • FQDN (fully qualified domain name) fully qualified domain name, which is the full domain name of a specific computer or host on the Internet.

How to apply for Let's Encrypt?

There is a new module included in CWP7 Left Menu → WebServer Settings → SSL Certificates, from there you can install Letsencrypt certificates for any domain/subdomain using AutoSSL.

(If you select Create Let's Encrypt at the same time when adding a domain name or subdomain name, you can skip the above steps)

Letsencrypt SSL Certificate Features

  • Letsencrypt for main account domain and www alias
  • Letsencrypt add domain name and www. alias
  • Letsencrypt for subdomains and www.alias
  • Letsencrypt can also install custom
  • Check the expiration date of the certificate
  • auto-renew
  • Force renewal button
  • Apache port 443 auto-detection

Automatic renewal of Letsencrypt SSL certificates

By default, Letsencrypt certificates are valid for 90 days.

Renewal is automatic and certificates are renewed 30 days before expiration.

There is a new module included in CWP7 Left Menu → WebServer Settings → SSL Certificates, from there you can install Letsencrypt certificates for any domain/subdomain using AutoSSL.

Edit the configuration file to replace the SSL certificate path

Next, you need to edit the configuration file and add the path to the SSL certificate (note to remove the comment, and change the path to your own).

Edit cwpsrv configuration file ▼

/usr/local/cwpsrv/conf/cwpsrv.conf

Add toMonit monitoringSSL port ▼

listen 2812 ssl;

There is also the following paragraph ▼

ssl_certificate /etc/pki/tls/certs/hostname.crt;
ssl_certificate_key /etc/pki/tls/private/hostname.key;

Replace with the following path ▼

ssl_certificate /etc/pki/tls/certs/server.yourdomain.com.bundle;
ssl_certificate_key /etc/pki/tls/private/server.yourdomain.com.key;

Once done, don't forget to restart the cwpsrv service with the following command ▼

service cwpsrv restart

Then go to Webserver Settings → WebServers Conf Editor → Apache → /usr/local/apache/conf.d/

Edit Profile ▼

hostname-ssl.conf

Put the following paragraph ▼

ssl_certificate /etc/pki/tls/certs/hostname.crt;
ssl_certificate_key /etc/pki/tls/private/hostname.key;

Replace with the following path ▼

ssl_certificate /etc/pki/tls/certs/server.yourdomain.com.bundle;
ssl_certificate_key /etc/pki/tls/private/server.yourdomain.com.key;
  • If you are using Nginx, you need to do the same.

Then restart the Apache (and Nginx) service and make sure it works as usual?

systemctl restart httpd
systemctl restart nginx

Finally, refresh the login link to view port 2087https:// server.yourdomain. com:2087/login/index.phpIs there a dongle?

Hope Chen Weiliang Blog ( https://www.chenweiliang.com/ ) shared "CWP7 SSL error? How does the hostname install the Letsencrypt free certificate?", which is helpful to you.

Welcome to share the link of this article:https://www.chenweiliang.com/cwl-27950.html

Welcome to the Telegram channel of Chen Weiliang's blog to get the latest updates!

🔔 Be the first to get the valuable "ChatGPT Content Marketing AI Tool Usage Guide" in the channel top directory! 🌟
📚 This guide contains huge value, 🌟This is a rare opportunity, don’t miss it! ⏰⌛💨
Share and like if you like!
Your sharing and likes are our continuous motivation!

 

Comment

Your email address will not be published. Required fields * Callout

scroll to top