Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to configure multiple SSL certificates for a single IP address in Nginx

Shulou Source: shulou.com Published: 2022-06-01 20:16:07 10月03日 Update

1. Check whether Nginx supports TLS.

$nginx-V...TLS SNI support enabled...

2. If TLS SNI support disable appears, you have to upgrade the openssl version and recompile nginx.

The specific steps are as follows:

Download openssl first (1.0.1h version is recommended)

# wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz

Download Nginx

# wget http://nginx.org/download/nginx-1.9.9.tar.gz

Decompress openssl

# tar-zxvf openssl-1.0.1h.tar.gz

Extract the nginx and compile

# tar-zxvf nginx-1.9.9.tar.gz#cd nginx-1.9.9#./configure-user=www-group=www-prefix=/usr/local/nginx-with-http_stub_status_module-with-http_ssl_module-with-http_gzip_static_module-with-ipv6-with-openssl=../openssl-1.0.1h/#make & & make install

# check Nginx version information

# / usr/local/nginx/sbin/nginx-Vnginx version: nginx/1.9.9built by gcc 4.1.2 20080704 (Red Hat 4.1.2-55) built with OpenSSL 1.0.1 h 5 Jun 2014TLS SNI support enabledconfigure arguments:-- user=www-- group=www-- prefix=/usr/local/nginx-- with-http_stub_status_module-- with-http_ssl_module-- with-http_gzip_static_module-- with-ipv6-- with-openssl=../openssl-1.0.1h/

Configure the domain name certificate in Vhost

Server {# listen 80; listen 443 ssl; # listen [:]: 80; server_name we.baohua.me; root/ home/wwwroot/we.baohua.me; ssl on; ssl_certificate_key / home/wwwroot/cert/we.baohua.me.key; ssl_certificate / home/wwwroot/cert/we.baohua.me.crt Ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers Higger SSL SSL MD5; #} the above is how to configure multiple SSL certificates for a single IP address in SSL. If you happen to have similar doubts, please refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Tags: Certificate configuration version address multiple content analysis inspection compilation professional small and medium information rich content domain name that is suggestions articles more steps knowledge Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Apple Huawei Linux vpn