Hi, in my /etc/httpd/conf/httpd.conf I have the following:
User backuppc Group backuppc I've tried User apache Group apache but backuppc guy was not happy with User backuppc Group apache I'm still getting 504 error. I've changed /etc/httpd/conf.d/BackupPC.conf like this: <DirectoryMatch /usr/(share|libexec)/BackupPC/> # <Directory /usr/share/BackupPC/> # BackupPC requires valid authentication in order for the web interfaceto # function properly. One can view the web interface withoutauthentication # though all functionality is disabled. # # htpasswd -c /etc/BackupPC/apache.users yourusername # AuthType Basic AuthUserFile /etc/BackupPC/apache.users AuthName "BackupPC" <IfModule mod_authz_core.c> # Apache 2.4 <RequireAll> Require valid-user <RequireAny> # Require local Require all granted </RequireAny> </RequireAll> </IfModule> <IfModule !mod_authz_core.c> # Apache 2.2 # AllowOverride All order allow,deny deny from all allow from 127.0.0.1 192.168.xx.xx require valid-user </IfModule> </DirectoryMatch> Alias /BackupPC/images /usr/share/BackupPC/html/ ScriptAlias /BackupPC /usr/share/BackupPC/sbin/BackupPC_Admin ScriptAlias /backuppc /usr/share/BackupPC/sbin/BackupPC_Admin Alias /BackupPC/html/ /usr/share/BackupPC/html/ the dir /etc/BackupPC is like this: -rw-r--r--. 1 backuppc apache 47 16 jan 2017 apache.users -rw-r--r--. 1 backuppc backuppc 45 4 avr 2015 backuppc.users -rw-r-----. 1 backuppc apache 79912 14 nov 16:28 config.pl -rw-r-----. 1 backuppc apache 80952 20 déc 2009 config.pl~ -rw-r-----. 1 backuppc apache 79231 16 déc 2018 config.pl.old -rw-r-----. 1 backuppc apache 85115 4 jan 2015 config.pl.pre-3.3.0 -rw-r-----. 1 backuppc apache 79231 14 nov 16:28 config.pl.pre-4.4.0 -rw-r-----. 1 backuppc apache 84981 29 jui 2011 config.pl.rpmnew -rw-r--r--. 1 backuppc apache 79936 14 nov 16:28 config.pl.sample -rw-r-----. 1 backuppc apache 2570 4 sep 2019 hosts -rw-r--r--. 1 backuppc apache 2209 25 sep 2009 hosts~ -rw-r-----. 1 backuppc apache 2552 16 déc 2018 hosts.old -rw-r--r--. 1 backuppc apache 2214 29 jui 2011 hosts.rpmnew -rw-r--r--. 1 backuppc apache 2214 14 nov 16:28 hosts.sample -rw-r-----. 1 backuppc backuppc 0 17 nov 22:00 LOCK drwxr-xr-x. 2 backuppc apache 4096 19 avr 2021 pc dir /etc/httpd/conf.d is like this: -rw-r--r--. 1 root root 736 8 jun 2020 apcupsd.conf -rw-r--r--. 1 root root 2926 10 nov 09:26 autoindex.conf -rw-r--r--. 1 backuppc apache 1076 17 nov 21:32 BackupPC.conf -rw-r--r--. 1 backuppc apache 1410 17 jan 2017 BackupPC.conf~ -rw-r--r--. 1 backuppc apache 1188 16 jan 2017 BackupPC.conf.bak -rw-r--r--. 1 root root 286 17 mai 2020 nextcloud.conf -rw-r--r--. 1 root root 300 16 mai 2020 nextcloud.conf~ -rw-r--r--. 1 root root 112 17 jan 2017 non-ssl.conf.bak -rw-r--r--. 1 root root 986 18 mai 2017owncloud-access.conf.avail -rw-r--r--. 1 root root 278 18 mai 2017 owncloud-auth-any.inc -rw-r--r--. 1 root root 313 18 mai 2017owncloud-auth-local.inc -rw-r--r--. 1 root root 263 18 mai 2017 owncloud-auth-none.inc -rw-r--r--. 1 root root 1867 18 mai 2017 owncloud.conf -rw-r--r--. 1 root root 2400 18 mai 2017 owncloud-defaults.inc -rw-r--r--. 1 backuppc apache 1752 4 nov 2019 perl.conf /etc/BackupPC/apache.users contain: backuppc:$apr1$xOS1ZYx2$GcZ..... In my httpd log I have this error: The Alias directive in /etc/httpd/conf.d/BackupPC.conf at line 37 will probably never match because it overlaps an earlier Alias. The ScriptAlias directive in /etc/httpd/conf.d/BackupPC.conf at line 38 will probably never match because it overlaps an earlier ScriptAlias. The ScriptAlias directive in /etc/httpd/conf.d/BackupPC.conf at line 39 will probably never match because it overlaps an earlier ScriptAlias. The Alias directive in /etc/httpd/conf.d/BackupPC.conf at line 40 will probably never match because it overlaps an earlier ScriptAlias. line 37 to 40 are: Alias /BackupPC/images /usr/share/BackupPC/html/ ScriptAlias /BackupPC /usr/share/BackupPC/sbin/BackupPC_Admin ScriptAlias /backuppc /usr/share/BackupPC/sbin/BackupPC_Admin Alias /BackupPC/html/ /usr/share/BackupPC/html/ Claude Le Wed, 17 Nov 2021 09:31:18 -0500 jbk <j...@kjkelra.com> a écrit: > On 11/16/21 22:10, Claude Gelinas wrote: > > Hi, > > > > My setup for backuppc is like this since many years > > backuppc 3.3.0 > > user backuppc > > group backuppc > > and it was working perfectly since many years > > with /var/lib/BackupPC/ mounted via nfs on a Freenas server. > Claude, > I also had a working version 3.3 system that I upgraded to > 4.4. The GUI would not work in 4.4 until I made the specific > edits to > > "/etc/httpd/conf.d/BackupPC.conf" as I posted previously. Also, the > apache user has to have group permissions for all the .pl and .conf > files I have indicated in "/etc/httpd/conf.d", > "/etc/BackupPC , /etc/BackupPC/pc/" and top level folder > ie. /etc/BackupPC. Please confirm this for me or anyone else on the > mailing list who might step in to help. See below for my line item > edit recommendations for your /etc/httpd/conf.d/BackupPC.conf. > > JimK > > > > > My problem started with the update of the freenas server. I've > > updated backuppc to version 4.4.0 but this didn't solve my problem: > > 504 gateway timeout > > > > I'm still able to make backup of all my PC but the Backuppc guy > > didn't work for machine states or any host viewing. This prevent me > > to make restore if ever I have a problem with one PC. > Apache/httpd can't read files that it doesn't have group > permission to see per above comment. > > > > > my /etc/httpd/conf.d/BackupPC.conf is as follow: > Insert the following line at the top of this conf file: > <DirectoryMatch /usr/(share|libexec)/BackupPC/> > > # BackupPC requires valid authentication in order for the web > > interface # to function properly. One can view the web interface > > without # authentication though all functionality is disabled. > > # > > # htpasswd -c /etc/BackupPC/apache.users yourusername > > # > > AuthType Basic > > AuthUserFile /etc/BackupPC/apache.users > > AuthName "BackupPC" > > > > <IfModule mod_authz_core.c> > > # Apache 2.4 > > <RequireAll> > > Require valid-user > > <RequireAny> > comment out or delete the line "Require local" > > Require local > > > > > Require all granted > > </RequireAny> > > </RequireAll> > > </IfModule> > > > > > > <IfModule !mod_authz_core.c> > > # Apache 2.2 > comment out or delete the line "AllowOverride All" > > AllowOverride All > > > order allow,deny > > deny from all > insert the following two lines: > > allow from 127.0.0.1 192.168.xx.xx > > require valid-user > > </IfModule> > Per version 4.4 the line </Directory> is now </DirectoryMatch> > > </Directory> > > > > Alias /BackupPC/images /usr/share/BackupPC/html/ > > ScriptAlias /BackupPC /usr/share/BackupPC/sbin/BackupPC_Admin > > ScriptAlias /backuppc /usr/share/BackupPC/sbin/BackupPC_Admin > > Alias /BackupPC/html/ /usr/share/BackupPC/html/ > Delete everything below it is in conflict with above. > > <Directory /usr/share/BackupPC/html/> > > > > <IfModule mod_authz_core.c> > > > > # Apache 2.4 > > > > <RequireAll> > > > > Require all granted > > <RequireAny> > > Require valid-user > > </RequireAny> > > </RequireAll> > > </IfModule> > > > > > > <IfModule !mod_authz_core.c> > > # Apache 2.2 > > > > order allow,deny > > deny from all > > allow from 127.0.0.1 192.168.xx.xx > > AuthType Basic > > AuthUserFile /etc/BackupPC/apache.users > > AuthName "BackupPC" > > require valid-user > > </IfModule> > > </Directory> > > > > Could it be because it is set for apache 2.2 instead of apache 2.4 ? > > > > Thank you > > ------------------------- > > > > Le Mon, 15 Nov 2021 09:09:20 -0500 > > jbk<j...@kjkelra.com> a écrit: > > > >> On 11/14/21 17:22, Claude Gelinas wrote: > >>> I've updated BKP to 4.4.0 but I still get the same 504 gateway > >>> error when I try to access the host summary in the GUY. Same if I > >>> try to see backup from any host. Other items in the left side > >>> menu are working. > The owner/group shown below are correct > >>> /var/lib/Backuppc is NFS mounted from my freenas and I can see > >>> there all pc and backup. File permission/ owner are as follow > >>> > >>> drwxr-x---. 146 backuppc backuppc 146 14 nov 17:16 cpool > >>> drwx------. 2 backuppc backuppc 2 1 déc 2007 lost+found > >>> drwxr-x---. 20 backuppc backuppc 20 14 nov 16:32 pc > >>> drwxr-x---. 2 backuppc backuppc 2 22 jan 2012 pool > >>> drwxr-x---. 2 backuppc backuppc 2 14 nov 03:11 trash > >>> > >>> Look like backup are still done but I can't see host summary or > >>> any pc backup > >>> > >>> Backuppc state on the guy say: > >>> Le PID du serveur est 32620, sur l'hôte localhost, version > >>> 4.4.0, démarré le 14/11 16:32. Ce rapport a été généré le 14/11 > >>> 17:07. La configuration a été chargée pour la dernière fois à > >>> 14/11 16:32. La prochaine file d'attente sera remplie à 14/11 > >>> 18:00. > >>> > >>> Any idea of what is wrong ? > >> It appears that apache/httpd is not set up correctly. On my > >> system the httpd user is apache and a listing of > >> /etc/BackupPC/ shows that the config.pl files need to have > >> apache as the group > >> /# ll /etc/BackupPC/ > >> total 388 > >> -rw-r--r-- 1 backuppc apache 84 Sep 9 12:58 apache.users > >> drwxr-x--- 2 backuppc backuppc 4096 Nov 25 2011 bin > >> -rw-r--r-- 1 backuppc apache 86823 Sep 11 17:59 config.pl > >> -rw-r--r-- 1 backuppc apache 86823 Sep 11 17:57 config.pl.old > >> -rw-r--r-- 1 backuppc apache 88110 Sep 8 17:51 > >> config.pl.testr8 > >> -rw-r--r-- 1 backuppc apache 88378 Jun 22 2020 > >> config.pl.testr8~ > >> drwxr-xr-x 2 root root 4096 Sep 9 09:34 distorig > >> -rw-r--r-- 1 backuppc apache 2279 Sep 11 17:59 hosts > >> -rw-r--r-- 1 backuppc apache 2246 Sep 9 09:46 hosts~ > >> -rw-r--r-- 1 backuppc apache 2263 Sep 11 17:57 hosts.old > >> -rw-r--r-- 1 root root 2246 Sep 9 09:46 hosts.test > >> -rw-r--r-- 1 root root 2247 Sep 9 09:40 hosts.test~ > >> -rw-r----- 1 backuppc backuppc 0 Nov 15 03:00 LOCK > >> drwxr-xr-x 3 backuppc apache 4096 Sep 11 18:00 pc > >> > >> /Also in /etc/httpd/conf.d > >> > >> /# ll /etc/httpd/conf.d > >> total 32 > >> -rw-r--r-- 1 root root 2926 Oct 12 22:30 autoindex.conf > >> -rw-r--r-- 1 backuppc apache 979 Sep 10 10:21 BackupPC.conf > >> -rw-r--r-- 1 backuppc apache 954 Sep 9 14:04 BackupPC.conf~ > >> -rw-r--r-- 1 backuppc apache 1713 Jul 14 05:36 perl.conf > >> -rw-r--r-- 1 root root 400 Oct 12 22:30 README > >> -rw-r--r-- 1 root root 1252 Oct 12 22:28 userdir.conf > >> -rw-r--r-- 1 root root 574 Oct 12 22:28 welcome.conf > >> -rw-r--r-- 1 root root 574 Jun 11 11:33 > >> welcome.conf.disable > >> > >> /This is the contents of /etc/httpd/conf.d/BackupPC.conf > >> > >> /# BackupPC requires valid authentication in order for the > >> web interface to > >> # function properly. One can view the web interface without > >> authentication > >> # though all functionality is disabled. > >> # > >> # htpasswd -c /etc/BackupPC/apache.users yourusername > >> # > >> > >> AuthType Basic > >> AuthUserFile /etc/BackupPC/apache.users > >> AuthName "BackupPC" > >> > >> <IfModule mod_authz_core.c> > >> # Apache 2.4 > >> <RequireAll> > >> Require valid-user > >> <RequireAny> > >> # Require local > >> Require all granted > >> </RequireAny> > >> </RequireAll> > >> </IfModule> > >> <IfModule !mod_authz_core.c> > >> # Apache 2.2 > >> order deny,allow > >> deny from all > >> allow from 127.0.0.1 localhost 10.251.227 > >> allow from ::1 > >> require valid-user > >> </IfModule> > >> > >> </DirectoryMatch> > >> > >> > >> Alias /BackupPC/images > >> /usr/share/BackupPC/html/ > >> ScriptAlias /BackupPC /usr/libexec/BackupPC/BackupPC_Admin > >> ScriptAlias /backuppc /usr/libexec/BackupPC/BackupPC_Admin > >> ~ > >> > >> /This is on a Rockylinux machine. > >> ///// > >> / _______________________________________________ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List: https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki: https://github.com/backuppc/backuppc/wiki Project: https://backuppc.github.io/backuppc/