Although it has not been said that SSL domain name certificates must be used for ordinary personal websites so far, some B2C like user interaction and account security sites must be used. Even if they are not for the site's experience needs in search engines, they should also be responsible for the user's information. In his previous blog posts, Lao Zuo also shared several articles about the configuration of SSL domain name certificates in other common environments.
LLsMP One Key Package Environment (Litespeed) Deployment SSL Security Certificate Settings HTTPS Site
LAMP (Apache) environment deployment, installation of SSL security certificate and HTTPS encryption of website
LNMP One Key Package Environment Installing SSL Security Certificates and Deploying HTTPS Website URL Process
Lao Zuo has simply shared an article about configuring SSL for commonly used Apache, Nginx, and LiteSpeed environments. This article is based on the configuration of SSL in the AMH panel environment. Last week, some netizens raised the need to solve this problem, but it was released today due to the problem of time (most of the time, the tutorials are very troublesome. In order to be authentic, you must apply for a certificate yourself, and also need to deploy the environment).
First, preparations
Before we need to configure the domain name site SSL certificate for the AMH panel, we need to prepare several points:
A - AMH panel has been set up and the site has been bound
B - For the applied SSL certificate, prepare the "for Nginx" certificate file, one is a. crt file and the other is a. key file.
C - Require certification to read the article. Follow the steps.
Second, deploy the SSL extension module

Log in to the background of the AMH panel, search for SSL in the module extension area, find the SSL module shown in the above figure, and then download it.

Return to the module list, and then install the SSL module extension you just downloaded.
Third, deploy SSL certificate files

Then we deploy SSL certificates to prepare our work KEY and Two CRT files, open them with SUBTIME, copy the script inside, paste it into the corresponding text box and save it. (If there are multiple sites in AMH, check whether the site you need to deploy SSL is selected)
Fourth, forced jump to HTTPS website
So far, if we deploy the domain name, and then directly open the URL with SSL certificate through HTTPS, but if we need to force the jump to HTTPS, how can we solve it?
/usr/local/nginx/conf/vhost/
In the above directory, find the. conf file corresponding to the site, and then edit it.
if ($server_port = 80) {
return 301 https://$server_name$request_uri;
}
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
error_page 497 https://$server_name$request_uri;
Add the above script to the document, as shown below.

After the deployment and replacement is completed, execute amh nginx restart to restart nginx, which will take effect.
To sum up, deploying SSL domain name certificates on the AMH panel is relatively simple. It does not require much modification and configuration files, and can be completed by adding them directly to the module extension.