Új hozzászólás Aktív témák

  • vargalex

    félisten

    válasz CS_D #263 üzenetére

    Hi!

    Kipróbáltam lighttpd alatt, nálam sleep nélkül is hibátlanul működik.
    Nálam a config file szét van bontva modulok szerint, én így jobban átlátom. Ezek tartalma természetesen összegyúrható egy config file-ba.

    A /etc/lighttpd/lighttpd.conf-om érdemi tartalma:

    server.network-backend = "write"
    server.document-root = "/opt/share/www/"
    server.errorlog = "/opt/var/log/lighttpd/error.log"
    index-file.names = ( "index.html", "default.html", "index.htm", "default.htm", "index.php" )
    mimetype.assign = (
    ".pdf" => "application/pdf",
    ".class" => "application/octet-stream",
    ".pac" => "application/x-ns-proxy-autoconfig",
    ".swf" => "application/x-shockwave-flash",
    ".wav" => "audio/x-wav",
    ".gif" => "image/gif",
    ".jpg" => "image/jpeg",
    ".jpeg" => "image/jpeg",
    ".png" => "image/png",
    ".css" => "text/css",
    ".html" => "text/html",
    ".htm" => "text/html",
    ".js" => "text/javascript",
    ".txt" => "text/plain",
    ".dtd" => "text/xml",
    ".xml" => "text/xml"
    )
    $HTTP["url"] =~ "\.pdf$" {
    server.range-requests = "disable"
    }
    static-file.exclude-extensions = ( ".php", ".pl", ".fcgi", ".sh" )
    server.port = 8081
    server.pid-file = "/var/run/lighttpd.pid"
    server.upload-dirs = ( "/tmp" )
    include_shell "cat /etc/lighttpd/conf.d/*.conf"

    /etc/lighttpd/conf.d/01-access.conf:
    server.modules += ( "mod_access" )

    /etc/lighttpd/conf.d/02-auth.conf:
    server.modules += ( "mod_auth" )
    auth.backend = "htdigest"
    auth.backend.htdigest.userfile = "/etc/lighttpd/.passwd"
    auth.require = (
    "/mypage/" =>
    (
    "method" => "digest",
    "realm" => "my_realm",
    "require" => "valid-user"
    ),
    "/rtorrent/" =>
    (
    "method" => "digest",
    "realm" => "my_realm",
    "require" => "valid-user"
    )
    )

    /etc/lighttpd/conf.d/03-cgi.conf:
    server.modules += ( "mod_cgi" )
    cgi.assign = ( ".sh" => "/bin/sh" )

    /etc/lighttpd/conf.d/04-accesslog.conf:
    server.modules += ( "mod_accesslog" )
    accesslog.filename = "/opt/var/log/lighttpd/access.log"

    /etc/lighttpd/conf.d/05-https.conf:
    $SERVER["socket"] == ":443" {
    #### SSL engine
    ssl.engine = "enable"
    ssl.pemfile = "/etc/lighttpd/lighttpd.pem"
    server.document-root= "/opt/share/www_https"
    }

    /etc/lighttpd/conf.d/06-scgi.conf:
    server.modules += ( "mod_scgi" )
    scgi.server = (
    "/RPC2" =>
    ( "127.0.0.1" =>
    (
    "host" => "127.0.0.1",
    "port" => 5000,
    "check-local" => "disable"
    )
    )
    )

    /etc/lighttpd/conf.d/10-php-fcgi.conf:
    server.modules += ( "mod_fastcgi" )
    fastcgi.server = (
    ".php" =>
    (
    "localhost" =>
    (
    "socket" => "/tmp/php-fcgi.sock" + var.PID,
    "bin-path" => "/usr/bin/php-fcgi",
    "max-procs" => 1,
    "max-load-per-proc" => 4,
    "bin-environment" =>
    (
    "PHP_FCGI_CHILDREN" => "1",
    "PHP_FCGI_MAX_REQUESTS" => "70000"
    )
    )
    )
    )

    [ Szerkesztve ]

    Alex

Új hozzászólás Aktív témák