nginx配置SSL

0
server {
    listen 443 ssl;
    server_name www.knifez.net;
    ssl_certificate /usr/local/lighthouse/ssl/www.knifez.net_bundle.pem;
    ssl_certificate_key /usr/local/lighthouse/ssl/www.knifez.net.key;
    keepalive_timeout 5;
    client_max_body_size 50m;
    ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    # 以下省略
}

server {
    listen 80;
    server_name www.knifez.net;
    rewrite ^(.*)$ https://www.knifez.net;
}