Innovative Open source WEB technologies for everyone

IOWEB Technologies

with our news and our solutions

Magento Nginx - Thumbs not working in media manager

Symptoms

In certain server configurations Magento is unable to display the image thumbnails in Media Manager:

1. Thumbs failing

Cause

This used to be caused by a bug in Magento also, however If you’re using latest Magento versions it should be fixed and everything should be appearing correctly but sometimes  your server configuration is preventing the images from being downloaded.

As you can see in the next picture the requests in such cases return a 403 forbidden response.

2. 403 Forbidden

Resolution

Thumbs in magento are created in the folder  

/media/wysiwyg/.thumbs

As you can notice the directory name is preceded by a dot and some server configurations don’t allow access to files or folders when their name is preceded by a dot.
Most likely you can see a rule in your vhost configuration like the following:

location ~ /\. {
deny all;
}

This will cause anything preceded by a dot to throw an access forbidden exception.
As a workaround you can bypass this rule by using a location directive with higher importance than a regex match e.g.

location ^~ /media/wysiwyg/.thumbs/ {
allow all;
}

to allow access to the thumbnails again.

Rate this item
(0 votes)

Related items

Comments powered by CComment

FIND US

Eptapirgiou 149, Sykies
ZIP: 56626
Thessaloniki

Tel: +302314012823


WORKING HOURS

Monday-Friday: 9:00 – 17:00

Search