# $NetBSD: backuppc.conf,v 1.3 2020/10/20 22:16:16 tnn Exp $
#
# BackupPC sample configuration file fragment for Apache.
#
# Note that you have to perform some manual steps to make this work:
#
# 1) Install the setuid cgi-bin wrapper binary:
#
# gcc -o @PREFIX@/share/BackupPC/htdocs/BackupPC_Admin.cgi \
# @PREFIX@/share/examples/BackupPC/cgiwrapper.c
# chown @BACKUPPC_USER@:@APACHE_GROUP@ \
# @PREFIX@/share/BackupPC/htdocs/BackupPC_Admin.cgi
# chmod 4510 @PREFIX@/share/BackupPC/htdocs/BackupPC_Admin.cgi
#
# 2) Set an admin password:
#
# htpasswd -c @PKG_SYSCONFDIR@/htpasswd admin
# chmod 400 @PKG_SYSCONFDIR@/htpasswd
# chown @APACHE_USER@:@APACHE_GROUP@ @PKG_SYSCONFDIR@/htpasswd
#
# 3) Edit @PKG_SYSCONFDIR@/config.pl and add the
# admin user to $Conf{CgiAdminUsers}.
Alias /BackupPC "@PREFIX@/share/BackupPC/htdocs/"
AddHandler cgi-script .cgi
DirectoryIndex BackupPC_Admin.cgi
Options ExecCGI
AuthUserFile @PKG_SYSCONFDIR@/htpasswd
AuthType basic
AuthName "BackupPC login"
require all granted
require valid-user