Saltar al contenido
TURNKEYGNU / LINUX
AplicacionesDocumentaciónBlogCapturas de pantallaGitHubTurnKey Hub
文Español
EnglishEspañol中文日本語PortuguêsDeutsch
Home/Cómo configurar LigHTTPd (aka Lighty)

Documentación

Cómo configurar LigHTTPd (aka Lighty)

Sólo comparto algunas notas aquí porque yo no; no tengo ningún lugar mejor para ponerlas. :)

Negar acceso a subdir

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

Redirect http to https

Se basa en https habilitados. También asegúrese de que tiene mod_redirect cargado. E.g. esto en su /etc/lighttpd/lighttpd.conf:

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

Entonces esto:

# 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

Controla tu infraestructura sin empezar desde cero.

Explorar TurnKey
Acerca deDocumentaciónPreguntas frecuentesBlogGitHub
Libre y de código abiertoSeguro de forma predeterminadaListo para desplegar