backuppc_on_nginx
backuppc_on_nginx copied to clipboard
debian buster: root and alias conflict
Here on nginx of debian buster I had to remove the root
directive as nginx complained.
The working setup to be included in a server directive is:
# BEGIN BACKUPPC
location /backuppc {
allow 127.0.0.1/32;
allow 192.168.100.0/24;
deny all;
access_log /var/log/nginx/backuppc.access.log;
error_log /var/log/nginx/backuppc.error.log;
auth_basic "BackupPC";
auth_basic_user_file /etc/backuppc/htpasswd;
alias /usr/share/backuppc/cgi-bin/;
index /index.cgi;
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
}
location ~\.cgi$ {
gzip off;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/run/fcgiwrap.socket;
fastcgi_index BackupPC_Admin;
fastcgi_param SCRIPT_FILENAME /usr/share/backuppc/cgi-bin$fastcgi_script_name;
}
# END BACKUPPC