Last update at :2024-06-02,Edit by888u
The following is based on Debian 8 64-bit. In fact, it is also applicable to other Linux systems, using Nginx and Apache.
1. Install Nginx
1. Update the system apt update -y && apt upgrade -y2. Install Nginxapt install nginx -y
2. Install Lets Encrypt
1. Download certbot-autowget https://dl.eff.org/certbot-autochmod a+x ./certbot-auto
2. Request an SSL certificate./certbot-auto certonly –manual -d *.YOURDOMAIN –preferred-challenges dns-01 –server https://acme-v02.api.letsencrypt.org/directoryYOURDOMAIN Change to your domain name , for example, there will be a choice of Y/n in our .com. If you choose Y, you need to enter your email, fill in your email address, agree to the agreement, disagree to share the email, agree to the IP log
3. Add a TXT record to the DNS resolution as shown above: _acme-challenge.jlu.za.org is the TXT name, and the value is qsQBqvwTKIPZedxaSvz-eXYt_ts3PVToXnolvdJJJyojlu.za.org is your own domain name
4. After adding DNS resolution, wait a few minutes and press Enter. The certificate configuration file will be generated and located in the /etc/letsencrypt folder. The SSL certificate is as shown in the figure below.
5. Update the certificate LetsEncrypt Wildcard SSL certificate is valid for 3 months, and certbot-auto renew needs to be updated before expiration
6. Certbot knowledge a. Help file./certbot-auto –help allb, official website https://certbot.eff.org/
3. Nginx configuration LetsEncrypt Wildcard SSL certificate configuration file is as follows: server {
listen 80 default_server; listen [::]:80 default_server; server_name SUBDOMAIN.YOURDOMAIN; return 301 https://\$server_name\$request_uri;}server {
listen 443 ssl; ssl_certificate /etc/letsencrypt/live/YOURDOMAIN/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/YOURDOMAIN/privkey.pem; server_name SUBDOMAIN.YOURDOMAIN; root /var/www/html; index index.html; location ~ /.well-known { allow all; }}Change SUBDOMAIN.YOURDOMAIN and YOURDOMAIN to your own domain names
via: https://www.devcapsule.com/docs/read/letsencrypt-wildcard-nginx-debian-stretch/
Recommended site searches: registered domain name, Singapore server, .cn domain name registration, registration number query, domain name quick registration, foreign virtual host, free server vps server rental, mobile agent ip, Hong Kong server,
发表评论