In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces how to install the free SSL certificate on the website of the bricklayer VPS. It is very detailed and has a certain reference value. Interested friends must finish reading it!
The tutorial steps for installing a free SSL certificate on the website of the bricklayer on VPS:
Let's Encrypt is a certification authority (CA) that issues free SSL/TLS certificates. Lighttpd is a lightweight webserver that runs on low resources. The Let's Encrypt SSL certificate can be easily installed on a Lighttpd server that uses Certbot. Certbot is a software client that automates most of the process of obtaining certificates.
Note: a Vultr cloud computing instance using Lighttpd has been created on Ubuntu 16.04 with a domain name pointing to your server and logged in as root.
Step 1: install Certbot
Add the Certbot library and press Enter when prompted for confirmation.
Add-apt-repository ppa:certbot/certbot
Install Certbot.
Apt-get updateapt-get install certbot
Step 2: obtain the SSL certificate
Once Certbot is installed, you can obtain a SSL certificate. Run the following command: be careful to replace your own domain name
Certbot certonly-- webroot-w / var/www/html-d anxinssl.com-d www.anxinssl.com
Continue to install the program interactively.
Step 3: set up the certificate file using Lighttpd
Certbot will put the obtained certificate file into / etc/letsencrypt/live/anxinssl.com, and you need to grant the Lighttpd user access to the directory.
Chown: www-data / etc/letsencryptchown: www-data / etc/letsencrypt/livechmod gallex / etc/letsencryptchmod gallex / etc/letsencrypt/live
Lighttpd requires a certificate and a private key in one file. You need to merge the two files. Run the following command to replace anxinssl.com with your own domain name.
Cat / etc/letsencrypt/live/anxinssl.com/privkey.pem / etc/letsencrypt/live/anxinssl.com/cert.pem > / etc/letsencrypt/live/anxinssl.com/merged.pem
Privkey.pem and cert.pem files will be merged and saved as merged.pem
Step 4: configure Lighttpd
Once your certificate file is ready, you can continue and configure Lighttpd to use the SSL certificate. Open the Lighttpd configuration file for editing.
Nano / etc/lighttpd/lighttpd.conf
Replace anxinssl.com with your own domain name by adding the following block at the end of the file
$SERVER ["socket"] = ": 443" {ssl.engine = "enable" ssl.ca-file = "/ etc/letsencrypt/live/anxinssl.com/chain.pem" ssl.pemfile = "/ etc/letsencrypt/live/anxinssl.com/merged.pem"}
Step 5: use SSL
For added security, you can force your Lighttpd server to route all HTTP requests to HTTPS. Open the lighttpd.conf file for editing.
Nano / etc/lighttpd/lighttpd.conf
Add the following blocks at the end of the file
$HTTP ["scheme"] = = "http" {$HTTP ["host"] = ~ ". *" {url.redirect = (". *" = > "https://%0$0")}}]
Need to restart Lighttpd sever, complete.
Systemctl restart lighttpd
The above is all the contents of the article "how to install a free SSL certificate on the website of the bricklayer VPS". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.