Lighttpd reverse proxy and "no such child resource"

General support for problems installing or using Deluge
Senorsmartypants
New User
New User
Posts: 5
Joined: Sat Jul 22, 2017 10:02 pm
OS or Distro: Debian

Lighttpd reverse proxy and "no such child resource"

Postby Senorsmartypants » Sat Jul 22, 2017 10:14 pm

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.

Cas
Top Bloke
Top Bloke
Posts: 3441
Joined: Mon Dec 07, 2009 6:04 am
OS or Distro: Ubuntu 16.04
Location: Scotland

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

Postby Cas » Sun Jul 23, 2017 7:39 am


Senorsmartypants
New User
New User
Posts: 5
Joined: Sat Jul 22, 2017 10:02 pm
OS or Distro: Debian

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

Postby Senorsmartypants » Sun Jul 23, 2017 4:39 pm

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.

Cas
Top Bloke
Top Bloke
Posts: 3441
Joined: Mon Dec 07, 2009 6:04 am
OS or Distro: Ubuntu 16.04
Location: Scotland

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

Postby Cas » Sun Jul 23, 2017 9:20 pm

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?

Senorsmartypants
New User
New User
Posts: 5
Joined: Sat Jul 22, 2017 10:02 pm
OS or Distro: Debian

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

Postby Senorsmartypants » Sun Jul 23, 2017 10:11 pm

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.

Senorsmartypants
New User
New User
Posts: 5
Joined: Sat Jul 22, 2017 10:02 pm
OS or Distro: Debian

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

Postby Senorsmartypants » Sun Jul 23, 2017 10:18 pm

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.

Senorsmartypants
New User
New User
Posts: 5
Joined: Sat Jul 22, 2017 10:02 pm
OS or Distro: Debian

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

Postby Senorsmartypants » Sun Jul 23, 2017 10:41 pm

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
          )
        )
    )
}

Cas
Top Bloke
Top Bloke
Posts: 3441
Joined: Mon Dec 07, 2009 6:04 am
OS or Distro: Ubuntu 16.04
Location: Scotland

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

Postby Cas » Sun Jul 23, 2017 11:41 pm

Good to see you sorted out and that will be helpful addition to wiki.

Logging details are in the faq.

seanvree
Member
Member
Posts: 30
Joined: Tue Dec 27, 2016 1:42 pm
OS or Distro: windows

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

Postby seanvree » Tue Jul 25, 2017 11:09 pm

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.


viewtopic.php?f=12&t=54520&p=226964#p226964


Return to “Support”

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 17 guests