我尝试使用ssl和proxy设置Lighttpd,但我无法使其正常工作。 我已经安装了证书和私钥,但是当我尝试启用ssl时,端口(443)没有响应。
我的配置文件是(conf-enabled / 10-proxy.conf):
$HTTP["host"] == "carteirinha.ufabc.edu.br" {
proxy.server = ( "" => ((
"host" => "200.133.215.50",
"port" => 9004
)))
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/ssl/private_key.pem"
ssl.ca-file = "/etc/lighttpd/ssl/certificate_file.crt"
}
我的lighttpd.conf是:
server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
# "mod_rewrite",
)
server.document-root = "/var/www"
server.upload-dirs = ( "/var/cache/lighttpd/uploads" )
server.errorlog = "/var/log/lighttpd/error.log"
server.pid-file = "/var/run/lighttpd.pid"
server.username = "www-data"
server.groupname = "www-data"
index-file.names = ( "index.php", "index.html",
"index.htm", "default.htm",
" index.lighttpd.html" )
url.access-deny = ( "~", ".inc" )
static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )
include_shell "/usr/share/lighttpd/use-ipv6.pl"
dir-listing.encoding = "utf-8"
server.dir-listing = "enable"
compress.cache-dir = "/var/cache/lighttpd/compress/"
compress.filetype = ( "application/x-javascript", "text/css", "text/html", "text/plain" )
include_shell "/usr/share/lighttpd/create-mime.assign.pl"
include_shell "/usr/share/lighttpd/include-conf-enabled.pl"
答案 0 :(得分:2)
根据docs Lighttpd(版本为1.4.52),不支持使用mod_proxy的SSL / TLS。
答案 1 :(得分:0)
你需要告诉lighttpd监听端口443:
$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/ssl/private_key.pem"
ssl.ca-file = "/etc/lighttpd/ssl/certificate_file.crt"
}