'How to setup Lighttpd with ssl and proxy

I'm trying setup Lighttpd with ssl and proxy but I cannot make it work. I've installed the certificate and private-key and they works, however when I try to enable the ssl, the port (443) doesn't respond.

My configuration file is (conf-enabled/10-proxy.conf):

$HTTP["host"] == "host.com.br" {
        proxy.server = ( "" => ((
                "host" => "200.1.1.1",
                "port" => 9004
        )))
        ssl.engine = "enable"
        ssl.pemfile = "/etc/lighttpd/ssl/private_key.pem"
        ssl.ca-file = "/etc/lighttpd/ssl/certificate_file.crt"

}

My lighttpd.conf is:

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"


Solution 1:[1]

According in the docs Lighttpd at 1.4.52 doesn´t support SSL/TLS with mod_proxy.

Solution 2:[2]

You need to tell lighttpd to listen on port 443:

$SERVER["socket"] == ":443" {
    ssl.engine = "enable"
    ssl.pemfile = "/etc/lighttpd/ssl/private_key.pem"
    ssl.ca-file = "/etc/lighttpd/ssl/certificate_file.crt"
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Oscar Rivas
Solution 2 gstrauss