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

How to configure the HTTPS nginx.config file in Nginx

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

Share

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

Today, I will talk to you about how to configure HTTPS nginx.config files in Nginx. Many people may not know much about it. In order to make you understand better, the editor has summarized the following contents for you. I hope you can get something according to this article.

Directory location:

/ usr/local/www/nginx/conf (for reference only)

?

one

two

three

four

five

six

seven

eight

nine

ten

eleven

twelve

thirteen

fourteen

fifteen

Server {

Listen 443 ssl

Server_name localhost

Ssl_certificate server.crt; # cert.pem

Ssl_certificate_key server.key; # cert.key

Ssl_session_cache shared:SSL:1m

Ssl_session_timeout 5m

Ssl_ciphers HIGH:!aNULL:!MD5

Ssl_prefer_server_ciphers on

Location / {

Root / home/share

Autoindex on

Index index.html index.htm

}

}

These are the company servers.

Check that there is no problem with the configuration file and read the Nginx again.

?

one

two

three

four

five

six

seven

eight

nine

Nginx-t & & nginx-s reload

1 listen 443; listen on port 443

2 ssl on; enable SSL module

3 ssl_protocols SSLv2 SSLv3 TLSv1; specifies the SSL usage protocol

4 ssl_ciphers HIGHVERA Null LRV MD5; specify the encryption method

5 ssl_prefer_server_ciphers on; configuring server passwords that rely on SSLv3 and TLSv1 protocols will take precedence over client passwords

6 ssl_session_timeout 10m; set session timeout

7 ssl_certificate xxx.cer; configuration Certificate

8 ssl_certificate_key xxx.key; configuration key

After reading the above, do you have any further understanding of how to configure the HTTPS nginx.config file in Nginx? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.

Original link: http://blog.csdn.net/liudi0307/article/details/78875340

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