I am using Drupal 8.7.5 and PHP 7.3.7 running on Apache 2.4.6.
UPDATE: I'm trying to make available a library of images to the public. I chose the content type of 'Directory listing' to do this. In the Directory listing I have configured a private file path (i.e. located outside of Web root) to hold the images. Apparently I have done something right as it is working except for the thumbnails. I get constant 404 errors in my apache logs and the other errors through the web interface seen in the images below.
What have I missed in terms of getting the thumbnails working? Am I missing an binary or library to render the thumbnails? Did I not create or configure a path for the thumbnails?
Below are some of the steps I have done to configure the Directory listing.
UPDATE On the server I have installed Druapl 8 using composer and drush to $APACHE_CONTENT/drupal. The drush site-install then goes to $APACHE_CONTENT/drupal/web (drupal app_root) and have added a 'private' path as $APACHE_CONTENT/resources. This puts the 'private' path outside of the drupal site's DocumentRoot. The permissions and ownership for the 'private' path are 775 and apache.apache. Also, a .htaccess file was auto generated for the 'private' path. It contains the following:
# cat .htaccess # Deny all requests from Apache 2.4+. <IfModule mod_authz_core.c> Require all denied </IfModule> # Deny all requests from Apache 2.0-2.2. <IfModule !mod_authz_core.c> Deny from all </IfModule> # Turn off all options we don't need. Options -Indexes -ExecCGI -Includes -MultiViews # Set the catch-all handler to prevent scripts from being executed. SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006 <Files *> # Override the handler again if we're run later in the evaluation list. SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003 </Files> # If we know how to do it safely, disable the PHP engine entirely. <IfModule mod_php5.c> php_flag engine off </IfModule>
In drupal/sites/default/settings.php I have:
$settings['file_private_path'] = $app_root . '/../../resources';
Viewing the Configuration->Media->File system is see:
I've configured a private file path to use with content created via Content->Add Content->Directory listing.
I have then used
scp to copy files into the private path.
Through the web interface, I can browse through the content but I never see the thumbnails. I get errors above my content.
In the apache logs I see 404s for the thumbnails:
GET /system/files/styles/thumbnail/private/Images/JPG/Marshal_Hub.jpg?itok=QwQds55m HTTP/1.1" 404 11730
I have GD installed.
While I can browse all of the content in the 'private' paths, none of the thumbnails get generated.
What do I need to do to get the thumbnails working?