Lighttpd's config file verification request

Hi.

After upgrading OpenWRT from 18.xx to 19.xx,
the lighttpd's config not working.
(which means with below two parts, lighttpd not successfully started. automatically killed without error log.)

So I need help to fix the issue.
Is there any problem with below on OpenWRT v19's lighttpd?

part1

`    $SERVER["socket"] == ":80" {
        #only forword specific url
        $HTTP["url"] =~ "^/[.]well-known/acme-challenge/" {
            alias.url += ( "/.well-known/acme-challenge" => "/etc/dehydrated/www" ) #must be here inside
            server.document-root        = "/etc/dehydrated/www"
        }else{
            $HTTP["remoteip"] == "192.0.0.0/8" {
                $HTTP["host"] =~ ".*" { #Must use regEx patter before redirect
                    url.redirect = (".*" => "https://%0$0")
                }
            }else{
                url.access-deny = ( "" ) #directory deny
            }
        }
    }
`

Part2

$SERVER["socket"] == ":9998" {
        #WebDav
        #Denying user agents you can include bots here
        $HTTP["useragent"] =~ "(Google|Yandex|Bind|BUbiNG|MauiBot|zgrab)" {
            url.access-deny = ("Bot deny")
        }

        #preventing DoS
        server.max-keep-alive-requests=10
        server.max-keep-alive-idle=5
        server.max-read-idle=5
        server.max-write-idle=5

        #disable multi range requests
        server.range-requests    = "enable" #!! ENABLE for WebDav that need this option!!

        #disable symlinks
        server.follow-symlink    = "disable"

        #### mod_evasive
        evasive.max-conns-per-ip = 3

        #### limit request method "POST" size in kilobytes (KB)
        server.max-request-size  = 1

        ssl.engine                  = "enable"
        ssl.ca-file = "/etc/dehydrated/certs/ccccccccccccccccc/fullchain.pem"
        ssl.pemfile = "/etc/dehydrated/certs/ccccccccccccccccc/combined.pem"

        #add !! by Mitchell
        auth.backend                 = "htpasswd"
        auth.backend.htpasswd.userfile  = "/etc/dehydrated/htpasswd"

        auth.require               = ( "/" =>
                                       (
                                         "method"  => "basic",
                                         "realm"   => "Login Require",
                                         "require" => "user=aaaaaaaa|user=ddddddddd"
                                       ),
                                     )

        $HTTP["url"] =~ "^/webdav($|/)" {
            server.dir-listing = "enable"

            alias.url += ( "/webdav" => "/mnt/public" ) #must be here inside
            server.document-root        = "/mnt/public"

            webdav.activate = "enable"
            webdav.is-readonly = "enable"
            webdav.log-xml = "disable"
            webdav.sqlite-db-name = "/mnt/webdav.db"
        }else $HTTP["url"] =~ "/" {
            $HTTP["host"] =~ ".*" { #Must use regEx patter before redirect
                url.redirect = (".*" => "https://%0$0/webdav")
            }
        }else {
            url.access-deny = ( "" ) #directory deny
        }
}

Port 80, have your disabled or reconfigured uhttpd?

Tried starting lighttpd manually?

  • Disabled/commented the default 80 at the main conf file
  • Disabled the uhttpd of course!
  • sure, without the config above, manual restart works well. and openWrt v18.xx as well. it only happened on 19.xx