Lighttpd reverse proxy for Sickbeard e.a.
Published: 2014-01-23Services like Sickbeard and CouchPotato come with their own web server. This makes setting them up a breeze, but it also means you'll have multiple webservers running on your system. The built-in webserver runs on a predefined non-standard port, so as not to interfere with any regular web servers already present. This means you have to append the port to the URL (e.g. :8080) to reach the web interface, which can get pretty annoying.
To streamline your setup, you can use a reverse proxy, so that you can still use the standard HTTP port (80) and have access to the web interface those services provide.
Enable the proxy module in Lighttpd and add the following to your lighttpd.conf
:
$HTTP["url"] =~ "^/sickbeard/" {
proxy.server = ( "" =>
( "sickbeard" =>
( "host" => "192.1.2.3",
"port" => "8081"
)
)
)
}
The above snippet assumes the following:
- Your SickBeard installation is in a subdir of your web root called
sickbeard
. - The IP the SickBeard web server is listening on is 192.1.2.3.
- The port the SickBeard web server listens on is 8081.
Sickbeard is a bit iffy because its web root setting defaults to / (which is not entirely without logic). However, this will confuse Lighttpd, since SickBeard will point it back to the actual web root. You need to change config.ini
to the actual (relative) SickBeard installation path, -- in this case, sickbeard
:
web_host = 192.1.2.3
web_root = /sickbeard
A word of warning: do not edit this file while SickBeard is running. SickBeard will overwrite the configuration file. Also notice the trailing slash in the web_root
setting.
For CouchPotato, use the same approach in Lighttpd. Configure the proxy stanza according to CouchPotato's settings. Start Couchpotato, open the web interface, go to General, and tick Show advanced settings. Under Advanced Settings, set Url Base
to the relative directory CouchPotato is in, and you're good to go.
The same goes for AutoSub: Lighttpd configuration is identical. Make sure to edit AutoSub's configuration file as well (only do this when AutoSub is stopped to avoid unintentional side effects). Open config.properties
and point your web root to the AutoSub directory, not to the actual web root:
webroot = /autosub/
That's it, you're good to go.