Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question BackupPC: 403 Forbidden error


    I am trying to setup BackupPC on Nginx, but I am stuck on
    Code:
    403 Forbidden
    It is important to differentiate that this is not the nginx error message because the nginx error has all the nginx formatting and signature which looks like so:
    Code:
    403 Forbidden
    nginx/1.7.7.
    I was getting this nginx error it before, but I now fixed it and graduated to just pure
    Code:
    403 Forbidden
    which is being generated by I have no idea what (maybe backuppc itself?). Nginx error logs show no more errors, though.

    Here's my configs:

    /etc/nginx/sites-enabled/backuppc
    Code:
    server {
    
                    listen 80;
                    server_name backup;
                    access_log /var/log/nginx/backuppc.access_log;
                    error_log /var/log/nginx/backuppc.error_log;
    
                    root /usr/share/nginx/html/backuppc;
    
            location / {
                                                    auth_basic "BackupPC admin";
                                                    auth_basic_user_file /etc/backuppc/htpasswd;
                                                    alias /usr/share/nginx/html/backuppc;
                                                    index /index.cgi;
                                                    }
    
            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/nginx/html/backuppc$fastcgi_script_name;
                                                    }
            }

    nginx.conf
    Code:
    #user html;
    worker_processes  1;
    
    #error_log  logs/error.log;
    #error_log  logs/error.log  notice;
    #error_log  logs/error.log  info;
    
    #pid        logs/nginx.pid;
    
    
    events {
        worker_connections  1024;
    }
    
    
    http {
            index index.html index.htm index.php;
        include       mime.types;
        geoip_country /usr/share/GeoIP/GeoIP.dat;
            geoip_city        /usr/share/GeoIP/GeoLiteCity.dat;
        default_type  application/octet-stream;
        client_max_body_size 1000m;
    
        #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
        #                  '$status $body_bytes_sent "$http_referer" '
        #                  '"$http_user_agent" "$http_x_forwarded_for"';
    
        #access_log  logs/access.log  main;
    
        sendfile        on;
        #tcp_nopush     on;
    
        #keepalive_timeout  0;
        keepalive_timeout  65;
    
        #gzip  on;
    
            include /etc/nginx/sites-enabled/*;
    }
    /etc/backuppc/config.pl
    http://pastebin.com/raw.php?i=ydX2eaJT

    I also verified
    /etc/httpd/conf/extra/backuppc.conf
    Code:
      GNU nano 2.2.6                                    File: /etc/httpd/conf/extra/backuppc.conf                                                                                
    
    <Directory /usr/share/backuppc/cgi-bin>
      # This section tells apache which machines can access the interface.
      # You can change the allow line to allow access from your local
      # network, or comment out this region to allow access from all
      # machines.
      Require ip 127.0.0.1
      # allow from 127.0.0.1 192.168.7.7
    
      # You can change the authorization method to LDAP or another method
      # besides htaccess here if you are so inclined.
      AuthType Basic
      AuthUserFile /etc/backuppc/backuppc.users
      AuthName "BackupPC Community Edition Administrative Interface"
      require valid-user
    </Directory>
    
    <Directory /usr/share/backuppc/html>
      Require ip 127.0.0.1
      # allow from 127.0.0.1 192.168.7.7
    
    </Directory>
    
    Alias           /backuppc         /usr/share/backuppc/html
    ScriptAlias     /BackupPC_Admin         /usr/share/backuppc/cgi-bin/BackupPC_Admin
    The host I'm trying to connect to backuppc from is 192.168.7.7

    Uncommenting the "allow" part (which I had to add myself) does not change anything.

    I have been on it since over 24 hours and can't move forward. I'd appreciate any help.

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    14,038
    -->
    If these systems are on your LAN, why are you using http to do your backups? You should be able to use something like rsync to backup your files with a LOT less trouble.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •