nginx生成自签名证书
创建时间:2023-05-09 11:25:07
栏目:linux
openssl生成证书
openssl genrsa -out server.key 2048
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
nginx使用
server {
listen 18010 ssl;
#listen 443 ssl;
#server_name 10.13.22.124;
ssl on;
ssl_certificate /app/nginx/certificate/server.crt;
ssl_certificate_key /app/nginx/certificate/server.key;
ssl_session_timeout 5m;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
#ssl_ciphers HIGH:!aNULL:!MD5;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:HIGH:!aNULL:!MD5:!RC4:!DHE;
ssl_prefer_server_ciphers on;
location /ouyidaorder {
proxy_pass http://zuul_nginx;
}
}