This is the way I set up BackupPC with lighttpd on lenny...
apt-get install backuppc
In this process, apt-get will automatically install apache2 package (if not already installed), but if you don't need it, remove it with:
apt-get remove apache2* apt-get autoremove
Edit file /etc/lighttpd/lighttpd.conf and add "mod_cgi" to server.modules section.
Add "default.cgi" to index-file.names section.
Add this lines to the end of the file:
cgi.assign = ( ".cgi" => "/usr/bin/perl") alias.url += ( "/backuppc" => "/usr/share/backuppc/cgi-bin" )
Save the file and reload lighttpd config:
You should be now able to access BackupPC through address:
Create a password file:
(in this example, we will use plain text for password, but you can also use different methods like htpasswd, just later change 'backend' auth param)
chown www-data:www-data /etc/lighttpd/passwd chmod 700 /etc/lighttpd/passwd
Edit file /etc/lighttpd/lighttpd.conf and this line to section server.modules, if already don't exists:
And add this to the end of the file:
auth.backend = "plain" auth.backend.plain.userfile = "/etc/lighttpd/passwd" auth.require = ( "/backuppc/" => ( "method" => "basic", "realm" => "BackupPC", "require" => "user=backuppc" ) )
Reload lighttpd config:
Now you'll be asked for username/password before entering /backuppc/ path.