这里配置的是,转发到NPS服务器
http { server { listen 80; listen [::]:80; server_name www.cn86trading.com cn86trading.com shoes.cn86trading.com cnapi.cn86trading.com cnpay.cn86trading.com; # server_name *.cn86trading.com; return 301 https://$host$request_uri; #rewrite ^(.*)$ https://${server_name}$1 permanent; } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name cn86trading.com; ssl_certificate /etc/nps/nps_cert/cn86trading.com_bundle.crt; ssl_certificate_key /etc/nps/nps_cert/cn86trading.com.key; # ssl_session_cache shared:SSL:1m; 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_set_header Host $http_host; #proxy_set_header Host $host; proxy_pass http://127.0.0.1:8777; } } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name shoes.cn86trading.com; ssl_certificate /etc/nps/nps_cert/shoes.cn86trading.com_bundle.crt; ssl_certificate_key /etc/nps/nps_cert/shoes.cn86trading.com.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_set_header Host $http_host; proxy_pass http://127.0.0.1:8777; } } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name cnapi.cn86trading.com; ssl_certificate /etc/nps/nps_cert/cnapi.cn86trading.com_bundle.crt; ssl_certificate_key /etc/nps/nps_cert/cnapi.cn86trading.com.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_set_header Host $http_host; proxy_pass http://127.0.0.1:8777; } } server { listen 443 ssl http2; listen [::]:443 ssl http2; server_name cnpay.cn86trading.com; ssl_certificate /etc/nps/nps_cert/cnpay.cn86trading.com_bundle.crt; ssl_certificate_key /etc/nps/nps_cert/cnpay.cn86trading.com.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_set_header Host $http_host; proxy_pass http://127.0.0.1:8777; } } }
标签:配置,ssl,cn86trading,server,nginx,com,nps,listen From: https://www.cnblogs.com/wangfx/p/17216265.html