lighttpd的https配置
证书相当于公匙(参考mutt中适用gunpg)
pem相当于私匙。
Self-Signed Certificates:包含公匙和私匙的结合体,证书(公匙)会在连接请求的时候发给浏览器,
以便浏览器解密和加密。
1.创建Self-Signed Certificates
#openssl req -new -x509 \
-keyout server.pem -out server.pem \
-days 365 -nodes
上面的命令生成一个server.pem文件。
2.lighttpd配置
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "c:/lighttpd/sbin/server.pem"
}
3.启动测试
http和https均可以连接。
https会提示不可信任的证书,会提示用户确认以便继续操作。
参考:
http://trac.lighttpd.net/trac/wiki/Docs%3ASSL
http://forum.lighttpd.net/topic/3952
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请
点击举报。