This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Trouble with lighttpd mod_proxy

Tags: None
(comma "," separated)
Lynnae
Registered Member
Posts
4
Karma
0

Trouble with lighttpd mod_proxy

Fri Jul 17, 2009 5:11 am
Because I'm behind a router I like to open just 1 port and let lighttpd handle the reverse proxying.
Ktorrent doesn't seem to like this though.
It just keeps loading forever without a single message in lighttpd logs.
I have sabnzbd "proxified" like this aswell and it works fine.

Lighttpd config
Code: Select all
$HTTP["url"] =~ "^/ktorrent/" {
            proxy.server = (
                        "" => ((
                                    "host"            => "127.0.0.1",
                                    "port"            => 8081
                        ))
            )
}


Any ideas would be appreciated
George
Moderator
Posts
5421
Karma
1

Fri Jul 17, 2009 8:39 pm
What exactly are you trying to achieve here ?
Lynnae
Registered Member
Posts
4
Karma
0

Sat Jul 18, 2009 1:20 am
That instead of opening another port on my router I can tunnel it through lighttpd o.o


so it's a bit like this:

host/ktorrent <-> lighttpd proxy <-> ktorrent webui

instead of:

host:port <> ktorrent webui


Maybe this topic clarifies it a bit more: http://forums.sabnzbd.org/index.php?topic=777.0
George
Moderator
Posts
5421
Karma
1

Sun Jul 19, 2009 12:43 pm
Lynnae wrote:That instead of opening another port on my router I can tunnel it through lighttpd o.o


so it's a bit like this:

host/ktorrent <-> lighttpd proxy <-> ktorrent webui

instead of:

host:port <> ktorrent webui


Maybe this topic clarifies it a bit more: http://forums.sabnzbd.org/index.php?topic=777.0


And how do you intend to reach lighttpd from the outside without opening a port on the router ?
Lynnae
Registered Member
Posts
4
Karma
0

Sun Jul 19, 2009 7:54 pm
Lighttpd's port is open of course.
George
Moderator
Posts
5421
Karma
1

Thu Jul 23, 2009 11:29 am
Use wireshark to see if the requests end up at ktorrent
Lynnae
Registered Member
Posts
4
Karma
0

Sun Jul 26, 2009 1:27 pm
Changed to the 1.5 trunk version of lighttpd and changed the config to
$HTTP["url"] =~ "^/ktorrent(/|$)" {
proxy-core.backends = ( "127.0.0.1:8081" )
proxy-core.protocol = "http"
proxy-core.rewrite-request = (
"_uri" => ( "^/ktorrent/?(.*)" => "/$1" ),
)
}

to conform with the new format.

And it works wooohooo! sort of ><

The requested file /usr/share/kde4/apps/ktorrent/www//default/ktorrent was not found !


Tried every possible combination, but it keeps sticking /ktorrent at the end
George
Moderator
Posts
5421
Karma
1

Tue Jul 28, 2009 12:50 pm
Obviously the URL is wrong, lighttpd needs to rewrite the URL for this to work.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar