Skip to content

[BUG] nginx/site-confs/default.conf comes with its own client_max_body_size set to 2G, requires changing in addition to the php-local.ini in XBackBone to allow for larger files #39

@OfficialRenny

Description

@OfficialRenny

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Currently you are able to make changes to the php-local.ini to increase the upload size for XBackBone, however if you increase it past 2GB any files larger than that will still cause a 413 Request Entity too Large error, due to a limit set in the default /nginx/site-confs/default.conf too.

Expected Behavior

Changing the values in php-local.ini should be the only edits needed when increasing/decreasing the file upload limit, as it'd allow XBackBone to handle it all.
Either that, or it should be noted in the README that the nginx client_max_body_size should be adjusted too.

Steps To Reproduce

  1. Set up XBackBone
  2. Edit php-local.ini to increase file upload size past 2GB.
  3. Try uploading a larger file.
  4. Bar should reach 100% but then stay as-is, browser inspector's Network tab will show you the 413 error page on the POST request when uploading. (There will also be a console error, as I don't think XBackBone handles this case, as it may be expecting the file upload to be what it is set to in the PHP config, but that is another topic)
  5. Update /config/nginx/site-confs/default.conf, setting client_max_body_size to 0 to remove the 2GB limit.
  6. Re-upload the same file, and it should get saved successfully

Environment

- OS: Arch Linux 6.12.21-1-lts
- How docker service was installed: pacman

CPU architecture

x86-64

Docker creation

services:
  xbackbone:
    image: lscr.io/linuxserver/xbackbone:latest
    container_name: xbackbone
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    volumes:
      - config:/config
      - /mnt/data/xbackbone/uploads:/uploads
    ports:
      - 127.0.0.1:7140:80
      - 127.0.0.1:7141:443
    restart: unless-stopped
volumes:
  config:

Container logs

[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] done
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝
   Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: 3.8.1-ls185
Build-date: 2025-04-06T03:09:04+00:00
───────────────────────────────────────
    
using keys found in /config/keys
**** The following site-confs have extensions other than .conf ****
**** This may be due to user customization. ****
**** You should review the files and rename them to use the .conf extension or remove them. ****
**** nginx.conf will only include site-confs with the .conf extension. ****
/config/nginx/site-confs/default.conf.bak
[custom-init] No custom files found, skipping...
[ls.io-init] done.
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] done
usermod: no changes
───────────────────────────────────────
      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝
   Brought to you by linuxserver.io
───────────────────────────────────────
To support LSIO projects visit:
https://www.linuxserver.io/donate/
───────────────────────────────────────
GID/UID
───────────────────────────────────────
User UID:    1000
User GID:    1000
───────────────────────────────────────
Linuxserver.io version: 3.8.1-ls185
Build-date: 2025-04-06T03:09:04+00:00
───────────────────────────────────────
    
using keys found in /config/keys
[custom-init] No custom files found, skipping...
[ls.io-init] done.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions