Home > Operation and Maintenance > Nginx > How to configure Nginx to monitor SSL certificate on port 443

How to configure Nginx to monitor SSL certificate on port 443

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-05-13 09:19:05
forward
2749 people have browsed it

1. Prepare the certificate file

I am using the Alibaba Cloud Symantec free version ssl certificate. Download the certificate file and decompress it to get the following file

How to configure Nginx to monitor SSL certificate on port 443

Create an ssl directory in the nginx–>cert directory and copy all the above files to the ssl directory.

2. Modify the nginx.conf file

Fill in the following content in http{} of nginx.conf

server {
 listen 443;
 server_name www.httpstest.com;
 ssl on;
 root html;
 index index.html index.htm;
 #这里的.pem/.key文件替换成自己对应的文件名
 ssl_certificate cert/xxxxx.pem;
 ssl_certificate_key cert/xxxx.key;
 ssl_session_timeout 5m;
 ssl_ciphers ecdhe-rsa-aes128-gcm-sha256:ecdhe:ecdh:aes:high:!null:!anull:!md5:!adh:!rc4;
 ssl_protocols tlsv1 tlsv1.1 tlsv1.2;
 ssl_prefer_server_ciphers on;
 location / {
  #代理的目标地址
  proxy_pass http://127.0.0.1:10443;
 }
}
Copy after login

Finally, don’t forget to restart nginx service.

The above is the detailed content of How to configure Nginx to monitor SSL certificate on port 443. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
ssl certificate - php7.0.15 issues about ssl
From 1970-01-01 08:00:00
0
0
0
How to install ssl
From 1970-01-01 08:00:00
0
0
0
Looking for ssl encryption tutorial in php
From 1970-01-01 08:00:00
0
0
0
How to set up phpstudy ssl
From 1970-01-01 08:00:00
0
0
0
How to enable ssl in PHP toolbox
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template