修改 Makefile
Mac 下:
# https : turn on TLS_MODULE to add https support
TLS_MODULE=ltls
TLS_LIB="$(shell brew --prefix openssl)/lib"
TLS_INC="$(shell brew --prefix openssl)/include"
Linux 下:
# https : turn on TLS_MODULE to add https support
TLS_MODULE=ltls
TLS_LIB=
TLS_INC=
前提是都安装了 openssl
然后在 config 里设置
certfile = "./host.cert"
keyfile = "./host.key"
用 simpleweb.lua 测试,记得先把 http 改成 https
原文:https://www.cnblogs.com/hangj/p/12293241.html