Problem
The server returns a 404 error for files (images) managed by protected downloads, even if images are correctly uploaded in the protected directory: see the attached animation.
My settings:
Protected directory location:
MyProject
-- config
-- protected-files <- Here
-- web
---- core
---- modules
---- [and so on with default Drupal dirs]
Protected directory path setting:
$settings['protected_download_file_path_protected'] = $app_root . '/../protected-files';
Default download method:
Caching
Upload Destination (field_images)
NGINX errors:
NGINX error when uploading the image:
nginx_1 | 2024/08/26 09:40:06 [error] 48#48: *209 open() "/var/www/html/web/protected-download/protected/66d10b80/9NmU8NGnltNWQaoucK7BMgJKlVah_Zz0vUXBQwRUOqE/styles/thumbnail/protected/2024-08/MY-IMAGE.jpg.webp" failed (2: No such file or directory), client: 192.168.144.6, server: default, request: "GET /protected-download/protected/66d10b80/9NmU8NGnltNWQaoucK7BMgJKlVah_Zz0vUXBQwRUOqE/styles/thumbnail/protected/2024-08/MY-IMAGE.jpg.webp?itok=KCsTCxxj HTTP/1.1", host: "dev.itabots.com", referrer: "http://dev.itabots.com/node/2/edit"
NGINX error when viewing the node:
nginx_1 | 2024/08/26 09:40:13 [error] 48#48: *209 open() "/var/www/html/web/protected-download/protected/66d10b80/f2BsT2bKtj8K7qyEZyrLvDt79mImN3rKL4IWy825-yA/2024-08/MY-IMAGE.jpg" failed (2: No such file or directory), client: 192.168.144.6, server: default, request: "GET /protected-download/protected/66d10b80/f2BsT2bKtj8K7qyEZyrLvDt79mImN3rKL4IWy825-yA/2024-08/MY-IMAGE.jpg HTTP/1.1", host: "dev.itabots.com", referrer: "http://dev.itabots.com/node/2"
Any suggestion to fix the problem is appreciated, thank you.