Last update at :2024-06-15,Edit by888u
Snail years ago in \\"Junge LNMP V1.4 beta one-click script installation and functional upgrade experience\\" has simply experienced that there is currently no official version of V1.4. In theory, it will Officially launched on Children’s Day this year. From the experience and actual version change documents, we can see that the changes and optimizations are quite large, especially the new deployment of automatically installing Let’s Encrypt free SSL certificates, which is much easier to configure for the soon-to-be popular SSL certificate requirements.
Today a netizen needs help configuring an SSL certificate for a site. It is not a formal project. I temporarily used Snail to help him deploy the LNMP V1.4 environment, and then used the built-in quick deployment Let\\'s Encrypt free SSL Certificates allow quick deployment to sites. This is not done after deployment. Snail records the process in writing.
First, LNMP V1.4 configuration Let\\’s Encrypt preparations
1. LNMP V1.4 provides automatic and manual certificate installation, including free Let\\’s Encrypt configuration;
2. If we need to deploy Let\\’s Encrypt certificate, our domain name must be resolved to the server first, so that ownership will be automatically verified during configuration;
3. Let\\’s Encrypt certificate is free for 90 days. Our server needs to install Crontab for timing, and it will automatically help configure automatic renewal.
Second, LNMP V1.4 quickly configures Let\\’s Encrypt certificate
1. Add site configuration parameters
This is based on when we add a new site, and then add the SSL certificate together. If we already have an LNMP V1.4 environment and do not deploy an SSL certificate at the beginning, then we can add the site separately through lnmp ssl add. Certificate.
2. Choose how to configure SSL certificate
Here Snail hopes to automatically configure it. As long as our domain name is resolved and the email address is random, it will automatically help configure it.
3. Complete the configuration of the SSL certificate
We can see the successful interface for configuring the site. At this point we can open the site through HTTPS and see the successfully configured certificate.
Third, check whether Let\\’s Encrypt is automatically renewed
Before we configure the site, we need to ensure that crontab is installed on the server. If it is not installed, you can refer to "Linux System Environment Crontab Scheduled Task Setting Parameter Examples and Common Techniques" to install it. In this way, after configuring the SSL certificate, we check crontab -l to see if there is automatic renewal.
It has automatically helped us renew, so we don’t have to worry about manual renewal before the 90 days expires.
Fourth, follow-up work of deploying SSL certificate (301 jump)
After we install the SSL certificate, both http and https can access the site, but for the sake of uniqueness, we definitely need to make a 301 jump to https.
1. Directory address file
/usr/local/nginx/conf/vhost
We need to go to the .conf configuration file of the current site in this directory.
2. Modify the configuration file
if ($scheme = http ) {return 301 https://$host$request_uri;}
We add the above script to the current site configuration file.
In summary, in this way we quickly and easily deployed Let\\’s Encrypt free SSL certificate on the site. Snail estimates that the specific deployment method will not change much when the new version comes out.
Recommended site searches: foreign trade space, what is needed for website registration, virtual host rental, independent IP space, Alibaba Cloud server, free cloud host, Singapore server, Ministry of Industry and Information Technology registration website, website domain name query, US host reviews,
发表评论