cnode https是怎么弄的?
代码里面好像没有呢
8 回复
在nginx上配置的咯
var https= require(https)
@airyland 嗯嗯,nginx 上面配的
server { listen 80; server_name jysperm.me; return 301 https://$server_name$request_uri; }
server {
listen 443 ssl;
server_name jysperm.me;
root /home/jysperm/blog;
index index.html index.php;
autoindex off;
keepalive_timeout 70;
ssl_certificate /home/jysperm/blog/jysperm.me.crt;
ssl_certificate_key /home/jysperm/keys/jysperm.me.key;
ssl_ciphers AES128-SHA:AES256-SHA:RC4-SHA:DES-CBC3-SHA:RC4-MD5;
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
location / {
try_files $uri $uri/ /index.php;
}
location ~ \.php$ {
fastcgi_pass unix:///home/jysperm/phpfpm.sock;
include fastcgi_params;
fastcgi_index index.php;
}
}
分享一下我的,要注意 .key 文件不能放到网站目录下。
然后我上面的算法和缓存估计设置得不是很恰当,开了 SSL 之后明显感觉速度慢了很多。
顺便发现了 nodeclub 的一个 bug… https://github.com/cnodejs/nodeclub/pull/436
@jysperm thx
@inosqlorg 这东西很常规