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./trac/wiki/Docs%3ASSL http://forum./topic/3952 |
|
来自: 用勿龍潛 > 《lighttpd》