Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the method for Nginx server to install SSL certificate

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

Nginx server installation SSL certificate method is what, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.

1. Get server certificate file

Download the package and find the certificate in the Nginx folder.

two。 Install server certificate

Copy the server.key and server.cer files to the conf directory under the Nginx installation directory.

Open the nginx.conf file in the conf directory under the Nginx installation directory

find

# HTTPS server

#

# server {

# listen 443

# server_name localhost

# ssl on

# ssl_certificate cert.pem

# ssl_certificate_key cert.key

# ssl_session_timeout 5m

# ssl_protocols SSLv2 SSLv3 TLSv1

# ssl_ciphers all, "ADH", "ADH", "EXPORT56," RC4, "RSA,"HIGH," MED.

IUM:+LOW:+SSLv2:+EXP

# ssl_prefer_server_ciphers on

# location / {

# root html

# index index.html index.htm

#}

#}

Modify it to

Server {

Listen 443

Server_name localhost

Ssl on

Ssl_certificate server.cer

Ssl_certificate_key server.key

Ssl_session_timeout 5m

Ssl_protocols TLSv1 TLSv1.1 TLSv1.2

Ssl_ciphers ECDH:AESGCM:HIGH:!RC4:!DH:!MD5:!aNULL:!eNULL

Ssl_prefer_server_ciphers on

Location / {

Root html

Index index.html index.htm

}

}

Save the exit and restart Nginx.

Visit your site through https to test the installation and configuration of the site certificate.

Note: server.cer is the integration of server certificates and intermediate certificates.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report