nginx配置ssl证书

debian/ubunt

server {
  listen 443;
  server_name xiaochengx.qqsk.com;
  ssl on;
  ssl_certificate cert/214424795930441.pem;
  ssl_certificate_key cert/214424795930441.key; 两个ssh证书,放在/etc/nginx/cert目录
  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://ip:port;
  }
}

nginx_reload.sh ------ nginx reload脚本

#!/bin/bash

nginx -t

if  [ $? == 0]; then

  nginx -s reload;

  echo "nginx: reload";

fi

posted @ 2018-03-09 17:50  guuyoog  Views(163)  Comments(0Edit  收藏  举报