Ir para o conteúdo
TURNKEYGNU / LINUX
AplicativosDocumentaçãoBlogCapturas de telaGitHubTurnKey Hub
文Português
EnglishEspañol中文日本語PortuguêsDeutsch
Principal/Como configurar o LigHTTPd (também conhecido como Lighty)

Documentação

Como configurar o LigHTTPd (também conhecido como Lighty)

Apenas compartilhando algumas notas aqui porque eu não tenho um lugar melhor para colocá-las. :)

Negar o acesso ao subdir

# deny access to /data
$HTTP["url"] =~ "^/data" {
    url.access-deny = ("")
}

Redirecionar http para https

Confia em https sendo ativados. Certifique- se também de que você tem mod_ redirect carregado. Por exemplo, isto no seu /etc/lighttpd/lighttpd.conf:

server.modules              = (
            ...
            "mod_redirect",
 )

E depois isto:

# redirect all http to https
$HTTP["scheme"] == "http" {
    # capture vhost name with regex conditiona -> %0 in redirect pattern
    # must be the most inner block to the redirect rule
    $HTTP["host"] =~ ".*" {
        url.redirect = (".*" => "https://%0$0")
    }
}
TURNKEYGNU / LINUX

Controle sua infraestrutura sem começar do zero.

Explorar o TurnKey
SobreDocumentaçãoPerguntas frequentesBlogGitHub
Livre e de código abertoSeguro por padrãoPronto para implantar