Page 1 of 1

Lighttpd reverse proxy and "no such child resource"

Posted: Sat Jul 22, 2017 10:14 pm
by Senorsmartypants
I'm trying to setup reverse proxy using Lighttpd to my deluge-web server and I'm running into the dreaded "no such child resource" error. I could use some help debugging this.

Here's my setup

Server A 192.168.1.1:
Lighttpd 1.4.35 - proxy config

Code: Select all

server.modules   += ( "mod_proxy" )
server.modules   += ( "mod_setenv" )

$HTTP["url"] =~ "^/deluge/" {
    setenv.add-request-header = (
        "X-Deluge-Base" => "/deluge/"
    )
    proxy.server = ( "" =>
        (
          (
            "host" => "192.168.1.2",
            "port" => 8112
          )
        )
    )
}


I have reverse proxy setup to other services on Server B working fine with this Lighttpd server.

Server B - IP = 192.168.1.2
deluge-web 1.3.12
"base": "/"

deluge-web works fine at 192.168.1.2:8112

Is there a deluge-web log file? the proxy seems to be sending traffic to deluge-web, but something is obviously wrong.

Any help would be appreciated.

Re: Lighttpd reverse proxy and "no such child resource"

Posted: Sun Jul 23, 2017 7:39 am
by Cas

Re: Lighttpd reverse proxy and "no such child resource"

Posted: Sun Jul 23, 2017 4:39 pm
by Senorsmartypants
Yes, I did. I also read some related posts where other people are having the same no such child resource issue. But it's usually a different web proxy, or they say to make sure there are slashes at the end of the base settings. Which I have tried and has not helped.

The primary request is redirected to deluge by the proxy. Lighttpd does not generate a "no such child resource" message.

Re: Lighttpd reverse proxy and "no such child resource"

Posted: Sun Jul 23, 2017 9:20 pm
by Cas
You should not need to set base in Web config and those wiki settings do work. Have you compared other proxy configs for apache vs lighttpd, perhaps missed a setting?

Re: Lighttpd reverse proxy and "no such child resource"

Posted: Sun Jul 23, 2017 10:11 pm
by Senorsmartypants
I didn't alter base in web config, I just wanted to show that I didn't alter it from "/"

I have several other proxy setups working fine using lighttpd to other services. Just Deluge is causing a problem.

Are there any people on here with working lighttpd proxy setups that work? Would you care to share your setup? Maybe we can get that added to the wiki once it is confirm it works for others as well.

Re: Lighttpd reverse proxy and "no such child resource"

Posted: Sun Jul 23, 2017 10:18 pm
by Senorsmartypants
I would still like to know if there's a deluge-web log I can look at. I'd be helpful to be able to tell what requests are being made and what is failing.

Re: Lighttpd reverse proxy and "no such child resource"

Posted: Sun Jul 23, 2017 10:41 pm
by Senorsmartypants
After some more googling and looking at my other setups the issue was that there needed to be URL rewriting.

Lighttpd does this differently depending on the version as explained in this post

https://stackoverflow.com/questions/485 ... erse-proxy

So here is my working config for lighttpd 1.4. Please add this to the wiki page if possible.

Code: Select all

server.modules   += ( "mod_proxy" )
server.modules   += ( "mod_setenv" )

#redirect /deluge (no trailing slash) to /deluge/ with trailing slash
$HTTP["url"] =~ "^/deluge$" {
    url.redirect = ( "/deluge" => "/deluge/" )
}

$HTTP["url"] =~ "^/deluge/" {
    setenv.add-request-header = (
        "X-Deluge-Base" => "/deluge/"
    )
    proxy.server = ( "" =>
        (
          (
            "host" => "127.0.0.1",
            "port" => 81
          )
        )
    )
}

$SERVER["socket"] == ":81" {
    url.rewrite-once = ( "^/deluge/(.*)$" => "/$1" )
    proxy.server = ( "" =>
        (
          (
            "host" => "192.168.1.2",
            "port" => 8112
          )
        )
    )
}

Re: Lighttpd reverse proxy and "no such child resource"

Posted: Sun Jul 23, 2017 11:41 pm
by Cas
Good to see you sorted out and that will be helpful addition to wiki.

Logging details are in the faq.

Re: Lighttpd reverse proxy and "no such child resource"

Posted: Tue Jul 25, 2017 11:09 pm
by seanvree
I'm trying to get this to work on MS IIS, but I have never been able to get it to work.

Is anyone familiar with IIS that know how to convert these settings?

I have sonarr, radarr, sabnzbd, jackett that all use base path, and I have no issues, this is the only application I can't get to work.


http://forum.deluge-torrent.org/viewtop ... 64#p226964