Make PDF cover not working

I’m using Nginx. When I click Make PDF cover it doesn’t work. In log I see this error:

So test3 is a book. It’s search for wrong path. Right path is without test3:
/wp-content/themes/pressbooks-book/assets/book/typography/fonts/CormorantGaramond-Bold.ttf

Is there a wrong Nginx configuration? My config. I use subdirectories instead of subdomains for multisite setup.

# WordPress multisite subdirectory rules.
# Designed to be included in any server {} block.

map $uri $blogname{
        ~^(?P<blogpath>/[^/]+/)files/(.*) $blogpath ;
}

map $blogname $blogid{
        default -999;

        #Ref: https://wordpress.org/extend/plugins/nginx-helper/
        #include /var/www/html/wp-content/plugins/nginx-helper/map.conf ;
#       include /var/www/html/wp-content/uploads/nginx-helper/map.conf;
}

server {
        listen       80;
        server_name  gradiva.sio.si;

        root   /var/www/html;
        index index.php index.html index.htm;

        location ^~ /wp-content/themes {     
                internal;
                alias /var/www/html/wp-content/themes;
        }

        location ~ ^(/[^/]+/)?files/(.+) {
                try_files /wp-content/blogs.dir/$blogid/files/$2 /wp-includes/ms-files.php?file=$2 ;
                access_log off;     log_not_found off; expires max;
        }

        #avoid php readfile()
        location ^~ /blogs.dir {
                internal;
                alias /var/www/html/wp-content/blogs.dir ;
                access_log off;     log_not_found off; expires max;
        }

        if (!-e $request_filename) {
                rewrite /wp-admin$ $scheme://$host$request_uri/ permanent;
                rewrite ^(/[^/]+)?(/wp-.*) $2 last;
                rewrite ^(/[^/]+)?(/.*\.php) $2 last;
        }

        location / {
                try_files $uri $uri/ /index.php?$args ;
        }

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
        }
}

Tnx.

This is now working. I migrated to Apache.

1 Like