Hi,
I am trying, without success, settting up lighttpd to reverse proxy code-server app (https://github.com/cdr/code-server). I known this app is not part of dietpi, but someone might known how to do it.
I use lighttpd to reverseproxy some apps, and this one is the only one that I'm facing problems.
All apps were installed via docker.
On my lighttpd.conf, i add the following to reverseproxy an app:
$HTTP["url"] =~ "^/sonarr($|/)" {
proxy.server = ( "" =>
(( "host" => "192.168.1.94", "port" => 8989 ))
)
}
And its been working great, but I'm not sure what I'm missing.
I've searched about this, and tehy remove the option to use a base path, and that the the reverseproxy should rewrite requests.
https://github.com/cdr/code-server/discussions/1739
Does anyone known how to do this in lighttpd ?
Help configuring lighttpd Topic is solved
Re: Help configuring lighttpd
Please try to add the proxy.header option: https://redmine.lighttpd.net/projects/l ... s_ModProxy
Code: Select all
$HTTP["url"] =~ "^/sonarr($|/)" {
proxy.header = (
"map-urlpath" => (
"/sonarr" => ""
)
)
proxy.server = ( "" =>
(( "host" => "192.168.1.94", "port" => 8989 ))
)
}
-
- Posts: 39
- Joined: Thu Sep 05, 2019 10:26 am
Re: Help configuring lighttpd
Sorry fo the late response. I've tried like that and no luck
Sonarr service works, I'm having problems with this (code-server).
The strange part is that it seens to get there, but insted of going to the login page, it says:
"401
Unauthorized"
I'll have a look at this documentation that you linked. Will let you know how it goes.

Code: Select all
$HTTP["url"] =~ "^/code($|/)" {
proxy.header = (
"map-urlpath" => ( "/code" => "" )
)
proxy.server = ( "" =>
(( "host" => "192.168.1.94", "port" => 8443 ))
)
}
"401
Unauthorized"
I'll have a look at this documentation that you linked. Will let you know how it goes.
-
- Posts: 39
- Joined: Thu Sep 05, 2019 10:26 am
Re: Help configuring lighttpd
found this at the lighttpd error log (/var/log/lighttpd/error.log):
Code: Select all
2020-11-09 21:47:26: (server.c.1295) WARNING: unknown config-key: proxy.header (ignored)
-
- Posts: 39
- Joined: Thu Sep 05, 2019 10:26 am
Re: Help configuring lighttpd
Also just notice:
My version is:
Can I just update lighttpd?
Code: Select all
proxy.header: options to perform simple remapping of host and URL paths in proxied HTTP headers (since 1.4.46)
Code: Select all
root@DietPi:~# lighttpd -v
lighttpd/1.4.45 (/ssl) - a light and fast webserver
Build-Date: Jan 14 2017 21:07:19
Re: Help configuring lighttpd
what Debian version you are running? pls check.
I hope it's not Stretch as you need Buster to be able to upgrade lighttpd
https://packages.debian.org/de/lighttpd
Code: Select all
echo $G_DISTRO_NAME
https://packages.debian.org/de/lighttpd
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
-
- Posts: 39
- Joined: Thu Sep 05, 2019 10:26 am
Re: Help configuring lighttpd
It is stretch 

Re: Help configuring lighttpd
you are in same situation as this guy https://github.com/MichaIng/DietPi/issues/3808
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
-
- Posts: 39
- Joined: Thu Sep 05, 2019 10:26 am
Re: Help configuring lighttpd
Thanks for the info, I have a spare raspberrypi, if I install a new dietpi image, will it install Buster?
Re: Help configuring lighttpd
yes of course, Buster is the default since more than a year now 

Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team