This tutorial assumes a few things:
1. You already have lighttpd installed and working.
2. SABnzbd+ is installed on the same machine as lighttpd.
3. You're doing no virtual hosting.
4. You have basic unix skills and understanding of lighttpd configuration files.
Let's get started.
First, we'll need to ensure that the proper modules are loaded, so you'll need to edit your lighttpd.conf file:
(Note: If for some reason you don't have these modules, you'lll need to compile them)
Code: Select all
server.modules += (
"mod_auth",
"mod_proxy"
)
Next, let's add the necessary configuration:
Code: Select all
$HTTP["url"] =~ "^/sabnzbd/" {
auth.debug = 0
auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/path/to/password_file"
auth.require = (
"" => (
"method" => "basic",
"realm" => "Password Protected",
"require" => "valid-user"
)
)
proxy.server = (
"" => ((
"host" => "127.0.0.1",
"port" => 8080
))
)
}
The final step is to create an htpasswd file, located in the path you specified in the configuration above:
Code: Select all
$ htpasswd -c password_file username
Code: Select all
$ /etc/init.d/lighttpd restart