Jump to content

EmJay276

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by EmJay276

  1. @Mainfrezzer
    Thank you very much for your helpfull information and the link!

     

    I disabled the auto-tune and changed it to your suggestions (my Ethernet adapter is also connected via PCI).

     

    For everyone interested, I was able to reboot my server by connecting a keyboard (without a monitor) and type the following commands blind

    1) Login name

    root
    <ENTER>

    2) Password

    password
    <ENTER>

    3) Reboot

    powerdown -r
    <ENTER>

    Wait for ~120 sec

  2. I observed a wired issue. After my Fritzbox (router) OS update my unraid server loses its network connection and can't be accessed anymore.

    It's still up and running (I have my zigbee lights working fine) but I can't access the UI and the router does not show the server as connected device.

    This happened to me before at the last router update, but I only realized right now it was due to the router firmware update.

    One of my friends observed the same issue.

     

    And suggesting how to access the server without hard rebooting it?

  3. Hello,

     

    perhaps it is a stupid question, but is it possible to have an authentication for the Web Interface (called CGI, right?) ?

     

    I tried the steps from here ( https://hub.docker.com/r/tiredofit/backuppc/ ) by adding these Container Variables

    NGINX_AUTHENTICATION_TYPE=BASIC
    NGINX_AUTHENTICATION_BASIC_USER1=backuppc
    NGINX_AUTHENTICATION_BASIC_PASS1=backuppc

    which works perfectly fine until I stop and restart the docker container, then it fails with this log message repeating continuously (full log after restart attached)

    [42m[INFO][49m ** [nginx] Starting nginx 1.19.2
    nginx: [emerg] "auth_basic" directive is duplicate in /etc/nginx/conf.d/default.conf:4

    Any suggestions?

     

    -- Edit --

    I figured out, at every restart the following 2 lines are added again to /etc/nginx/conf.d/default.conf

    auth_basic "Please login";
    auth_basic_user_file /etc/nginx/nginx.conf.d/authentication/basic_authorized_users;

    Not sure where its coming from, havn't found the startup script yet.

     

    -- Edit 2 --

    Also in the file /etc/nginx/nginx.conf.d/authentication/basic_authorized_users an new entry for the user and the password is generated every startup id the Container Variables aboth are set. I did some further digging in the used nginx container but didn't find a solution.

     

    -- WORKAROUND --

    My workaround now is to manually add the users and the authentication method within the container after the first start by running lines 170 and 171 from https://github.com/tiredofit/docker-nginx/blob/ba1e3b4c81a5a29aa427ba37f6242c0e06d78053/install/etc/cont-init.d/10-nginx#L170-L171 manually

    htpasswd -b -n backuppc backuppc >>/etc/nginx/nginx.conf.d/authentication/basic_authorized_users
    sed -i '/ server {/a\ \ \  auth_basic "'"Please login"'";\n\ \ \  auth_basic_user_file /etc/nginx/nginx.conf.d/authentication/basic_authorized_users;' /etc/nginx/conf.d/*.conf

    This works fine for running and restarting the container. BUT reconfiguring the container removes (ofc) the changes. I tried mounting the whole etc/nginx/ folder to unraid, but this does not work. nginx within the container then won't create its config (don't know why).

     

    To keep the user and authentication settings even after changing the container I did the following steps (prob not the best solution, but it works for me right now).

    1) Copying the /conf.d and /authentication folders to my unraid share (paths may be changed or folders created manually)

    docker cp --follow-link backuppc:/etc/nginx/nginx.conf.d/authentication /mnt/user/appdata/backuppc/nginx/nginx.conf.d/authentication
    docker cp --follow-link backuppc:/etc/nginx/conf.d /mnt/user/appdata/backuppc/nginx/conf.d

    2) reconfiguring the docker container and adding these two mounts

    Host Path: /mnt/user/appdata/backuppc/nginx/conf.d/

    Container Path: /etc/nginx/conf.d

     

    Host Path: /mnt/user/appdata/backuppc/nginx/nginx.conf.d/authentication/

    Container Path: /etc/nginx/nginx.conf.d/authentication

     

    --

    If anyone has a better suggestion, I would love to hear it!

     

    -- Edit 3 --

    I also asked tiredofit (the docker container owner) for help, he mentioned, the container is not ment for restarting, its ment for cold starts.

    Quote

    tiredofit commented
    Are you just doing a restart of the container or a full stop/kill and start again? I can see this happening if you are just simply restarting the container as it's meant for cold starts - theres too much configuration in place that gets rewritten when the container initializes that would cause this duplicate issue you are seeing..

    Any suggestion how to accomplish this in Unraid?

     

    BackupPC - Nginx authentication - log.txt

×
×
  • Create New...