search
HomeOperation and MaintenanceNginxHow Nginx uses Let's Encrypt to encrypt https

HTTPS is now the standard for websites. Many services must use https. If you don’t use it, the browser may not be very friendly to you.

If you don't want to use a commercial CA key, you can use Let's Encrypt for encryption.

The only disadvantage of using Let's Encrypt is that it needs to be updated every 3 months. Of course, you can also use automatic updates to handle it.

We need to install the plug-in to achieve:

  • Obtain the pem key required for SSL encryption.

  • Set certbot to automatically update the secret key.

Required prerequisites

Nginx has been installed and the virtual host has been configured
Installedpython3-certbot-nginxPlug-in

We will not go into details about the configuration method of Nginx virtual host. You can search and configure it yourself.

Install the python3-certbot-nginx plug-in

The installation command is very simple:

Just execute the following command: sudo dnf install python3-certbot-nginx It should be noted that our command comes with nginx plug-in.

There is also an official one without plug-ins. It is not recommended to install that one because it is very difficult to match.

Get the pem key

Run the following commandsudo certbot certonly --nginx, you need to add nginx parameters later.

We can see from the loneliness below that this tool will detect several virtual hosts on your local server.

Then you need to choose the one you need to install.

After successful installation, the pem key we need will be generated.

How Nginx uses Lets Encrypt to encrypt https

Configure your virtual host

Find your virtual host file, and then configure the generated key.

For example, our virtual host configuration:

How Nginx uses Lets Encrypt to encrypt https

#We first configured the redirection of port 80 above, and then added the two generated key files to Just configure it at the specified location.

Then restart the Nginx server, and then check the HTTPS status of your website.

Check the HTTPS status of the website

You can use some third-party websites to check, or you can directly use the browser to check.

How Nginx uses Lets Encrypt to encrypt https

Mainly check whether the website has normal redirects and the expiration time of the SSL certificate.

The certificate above seems to be issued for a wide domain name.

The above is the detailed content of How Nginx uses Let's Encrypt to encrypt https. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:亿速云. If there is any infringement, please contact admin@php.cn delete
Honor Internet Service: AI empowerment and experience improvement, turning technological imagination into a concrete image of lifeHonor Internet Service: AI empowerment and experience improvement, turning technological imagination into a concrete image of lifeApr 13, 2025 pm 10:54 PM

On December 19, a media communication meeting with Honor Internet Services with the theme of "New Ecology, New Potential Energy and New Growth" was held in Guangzhou. Sun Jianfa, director of Honor Consumer Cloud Business Department, Ren Xulong, director of Guangdong Honor Business Department, Wang Guan, director of Honor Cloud business rules and marketing, and Su Tong, director of Guangdong Honor Retail, attended the meeting and shared the development strategy of Honor Internet services, such as AI, and other technological innovations and high-quality experiences. Honor Internet Services have been newly advanced, creating a more complete Internet service ecosystem. Honor Internet Services provide full-scene Internet service experience to Honor global terminal users, empowering users to "enjoy a smarter and more high-quality digital life" with a diverse product matrix in one-stop and full link. Sun Jianfa said, "Rong

Technology empowers smart medical care! Intel joins hands with industry partners to explore the way of integration of medicine and healthTechnology empowers smart medical care! Intel joins hands with industry partners to explore the way of integration of medicine and healthApr 13, 2025 pm 10:51 PM

Empowering technology to benefit people's livelihood: the new chapter of smart medical care is reduced to make "small illnesses not leaving townships" a reality. From remote consultation to AI-assisted diagnosis, technological advances are reshaping the medical service model. This article will discuss the results of the 2024 Intel Smart Medical Health Cooperation Forum, showing how intelligent technology can improve medical efficiency and convenience. Song Jiqiang, vice president of Intel Research Institute and dean of Intel China Research Institute of 2024 Intel Intel Intelligent Medical and Health Cooperation Forum, pointed out that strong computing power is the core driving force for the development of the digital economy and is also driving innovation in the medical and health field. Intel is committed to providing high-performance computing to meet the diverse needs of high concurrency, high precision and low latency in the medical field, and build large-scale intelligent medical solutions. Intel Research

No.9 Company exclusively named Yi Yang Qianxi's Bath Pool Concert: Showing the Art of Rejuvenating the BrandNo.9 Company exclusively named Yi Yang Qianxi's Bath Pool Concert: Showing the Art of Rejuvenating the BrandApr 13, 2025 pm 10:48 PM

Nine Company and brand spokesperson Yi Yang Qianxi have created glory again in the third year of cooperation! The "Battle Pond" Bath Pond Concert, exclusively sponsored by No. 9, has set a new benchmark for brand rejuvenation and industry cross-border cooperation with its unique artistic expression and sincere emotional expression. This concert, which was launched on December 7 and 8, is not only another innovative attempt in cross-border marketing by No. 9, but also a successful example of the deep emotional connection between the brand and young users. The blend of music and life: The unique charm of the bath pool concert. As the exclusive title party of the bath pool concert of "By the Pond", No. 9 has worked hard to create a unique music experience. The concert is divided into two episodes, which will be broadcast on December 7 and 8 respectively. Taking the "bath pool" as a scene with a very lifelike atmosphere

Cryptocurrency shakes again! More than 100,000 people have lost their positions, with a total amount of over 400 million US dollarsCryptocurrency shakes again! More than 100,000 people have lost their positions, with a total amount of over 400 million US dollarsApr 13, 2025 pm 10:45 PM

During the trading session of the US stock market, the price of Bitcoin exceeded US$107,000, setting a record high! As of now, the price has fallen slightly, maintaining around US$106,000. Coinglass data shows that in the past 24 hours, the number of people in the cryptocurrency market has reached 113,000, with a total amount of up to US$423 million. Among them, the long positions were liquidated by US$197 million and the short positions were liquidated by US$226 million. Affected by this, cryptocurrency concept stocks have generally risen. RiotPlatforms shares rose more than 8%, Bitdeer Technologies rose more than 10%, Canaan Technology rose more than 8%, and Coinbase shares rose 1.52%.

Lei Jun talks about Xiaomi's future goals: build at least 20 world-class factories in 10 years!Lei Jun talks about Xiaomi's future goals: build at least 20 world-class factories in 10 years!Apr 13, 2025 pm 10:42 PM

Xiaomi New Year's Eve Live: Lei Jun revealed that at least 20 world-class factories will be built in the next ten years! During last night's New Year's Eve live broadcast, Xiaomi Chairman Lei Jun summarized the company's brilliant achievements in the past year and announced that in the next ten years, Xiaomi plans to build at least 20 world-class factories! At present, Xiaomi has three advanced production bases: the mobile phone manufacturing center in Changping, Beijing’s modern electric vehicle factory in Yizhuang, and the Wuhan Smart Home Appliances Industrial Park, which will be put into production the year after tomorrow. These factories not only represent the peak of advanced manufacturing technology, but also show Xiaomi's huge contribution to the upgrading of China's manufacturing industry. Faced with Xiaomi's increasingly expanding business territory, Lei Jun emphasized that this is just the beginning. Xiaomi will make every effort to promote its intelligent manufacturing strategy, and in the future, more high-standard factories will be completed and put into production.

It will be officially released on December 25th! JD.com's 'Black Myth: Wukong' co-branded keyboard stimulates players' enthusiasm for making reservationsIt will be officially released on December 25th! JD.com's 'Black Myth: Wukong' co-branded keyboard stimulates players' enthusiasm for making reservationsApr 13, 2025 pm 10:39 PM

On December 25, the highly anticipated "Mo Ran Qiankun" keyboard jointly created by JD.com and "Black Myth: Wukong" IP will be officially launched! The "Mo Ran Qiankun" keyboard is an exclusive cooperation project of Black Myth IP in the keyboard category, and it is also the only keyboard product that has obtained the IP-party game science creative team to fully participate in the appearance design. It is understood that the "Ink-Dyeing the Universe" keyboard is divided into three versions: commemorative version, collector's version and limited collector's version, with prices of 699 yuan, 999 yuan and 1499 yuan respectively. Among them, the limited edition of "Ink Raining the Universe" has only 1,000 units released in the world. In terms of product design, the "Ink-Dyeing Universe" keyboard in JD.com incorporates many traditional cultural elements and game elements of "Black Myth: Wukong". For example, collector's edition and limited edition

NS2 accessories pictures frequently leaked, and players hope that performance will match a larger bodyNS2 accessories pictures frequently leaked, and players hope that performance will match a larger bodyApr 13, 2025 pm 10:36 PM

Rumors about Nintendo's next-generation Switch game console Switch2 continue to ferment. The recently exposed product pictures of third-party accessories manufacturers reveal some of the appearance details of this new handheld console. For example, the Switch2 translucent protective case picture released by Dbrand hints about its size change. According to Dbrand head Adam Ijaz, the Switch2's size is about 270mm wide, 116mm high, 14mm thick, and the host part is about 200mm wide based on 3D scanning data of real hardware. Compared with SwitchOLED (242mmx102mmx13.9mm), the Switch2's volume has increased significantly. This size change triggers

Nginx Server Installation and Quick Configuration GuideNginx Server Installation and Quick Configuration GuideApr 13, 2025 pm 10:18 PM

This article introduces the construction and configuration methods of Nginx. 1. Install Nginx: Use sudoyumininstallnginx on CentOS, use sudoapt-getinstallnginx on Ubuntu, and start with sudosystemctlstartnginx after installation. 2. Basic configuration: Modify the /etc/nginx/nginx.conf file, mainly modify the listen (port) and root (site root directory) instructions in the server block, and after modification, use sudosystemctlrestartnginx to restart and take effect. 3. Virtual host configuration: in nginx.co

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools