Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Can not access web page (500 Internal Server Error)

Featured Replies

Same Error: https://forums.unraid.net/topic/186646-unraid-web-gui-inaccessible-with-error-500/


syslog

Sep 22 07:56:39 NAS nginx: 2025/09/22 07:56:39 [error] 4739#4739: *88870 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.0.3, server: , request: "GET /Main HTTP/1.1", subrequest: "/auth-request.php", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "192.168.0.2"
Sep 22 07:56:39 NAS nginx: 2025/09/22 07:56:39 [error] 4739#4739: *88870 auth request unexpected status: 404 while sending to client, client: 192.168.0.3, server: , request: "GET /Main HTTP/1.1", host: "192.168.0.2"
Sep 22 07:56:39 NAS nginx: 2025/09/22 07:56:39 [error] 4739#4739: *88872 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.0.3, server: , request: "GET /favicon.ico HTTP/1.1", subrequest: "/auth-request.php", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "192.168.0.2", referrer: "http://192.168.0.2/Main"
Sep 22 07:56:39 NAS nginx: 2025/09/22 07:56:39 [error] 4739#4739: *88872 auth request unexpected status: 404 while sending to client, client: 192.168.0.3, server: , request: "GET /favicon.ico HTTP/1.1", host: "192.168.0.2", referrer: "http://192.168.0.2/Main"

I found why this error occurred,

origin /usr/local/emhttp/

root@NAS:/usr/local/emhttp# ls -alh
total 37K
drwxr-xr-x 1 root root 80 Jun 22 09:17 ./
drwxr-xr-x 1 root root 60 Jun 22 09:17 ../
-rw-r--r-- 1 root root 1.6K Nov 16 2023 auth-request.php
lrwxrwxrwx 1 root root 5 Nov 16 2023 boot -> /boot/
-rw-r--r-- 1 root root 15K Nov 16 2023 favicon.ico
drwxr-xr-x 1 root root 60 Nov 16 2023 languages/
lrwxrwxrwx 1 root root 8 Nov 16 2023 log -> /var/log/
-rw-r--r-- 1 root root 6.6K Nov 16 2023 logging.htm
-rw-r--r-- 1 root root 1.5K Feb 3 2024 login.php
lrwxrwxrwx 1 root root 4 Nov 16 2023 mnt -> /mnt/
drwxr-xr-x 1 root root 120 Jun 22 09:17 plugins/
-rw-r--r-- 1 root root 1.7K Jan 23 2025 redirect.htm
-rw-r--r-- 1 root root 26 Nov 16 2023 robots.txt
lrwxrwxrwx 1 root root 17 Nov 16 2023 state -> /var/local/emhttp/
-rw-r--r-- 1 root root 3.0K Nov 16 2023 update.htm
-rw-r--r-- 1 root root 5.9K Aug 28 2024 update.php
lrwxrwxrwx 1 root root 15 Nov 16 2023 webGui -> plugins/dynamix/

error then

root@NAS:/usr/local/emhttp# ls -alh
total 0
drwxr-xr-x 1 root root 320 Sep 22 04:30 ./
drwxr-xr-x 1 root root 60 Jun 22 09:17 ../
drwxr-xr-x 1 root root 60 Nov 16 2023 languages/
drwxr-xr-x 1 root root 140 Jun 22 09:17 plugins/
lrwxrwxrwx 1 root root 15 Nov 16 2023 webGui -> plugins/dynamix/

I do not know why some files removed..

Edited by KDY

Solved by KDY

  • Author
  • Solution

I found why this error occurred,

This happened entirely because of my mistake.

I use a plugin called user.script.

It's a simple file-moving script like the one below.

#!/bin/bash

shopt -s nullglob

SRC="/mnt/cache/recorders"
DST="/mnt/user/backup/recorders"

for cam in cam1 cam2 cam3 cam4; do
    files=( $(ls -1 "$SRC"/${cam}_*.mp4 2>/dev/null | sort) )
    count=${#files[@]}

    if (( count > 1 )); then
        for ((i=0; i<count-1; i++)); do
            f="${files[$i]}"
            mv "$f" "$DST/"
        done
    fi
done

At first glance, it doesn’t seem problematic, but if the SRC directory doesn’t actually exist, this becomes a serious issue.

I think the ls command is pointing to /usr/local/emhttp/ and moving those files to DST.

This wasn’t a problem with user.script or unraid, it was my fault for writing dumb code.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.