Piwigo nginx problems

By piwigo website was broken; when I uploaded new pictures, they would not appear on the page. At first I thought resizing with GD was the problem, but switching to Imagick didn’t help either.

The rewrite rules of nginx turned out to be the problem.

I had a location block in my virtual host that would serve static files directly. But this rewrite rule was hit while the uploading process was trying to use the i.php script for processing the upload.

The easiest way would be to just remove the static file serving part, but instead, I tried looking for a regex that would still serve static files directly, but just not the ones that needed processing. So, in fact, the ones starting with /i or /i.php.

So, eventually my virtual host looks something like this:

Leave a Reply

Your email address will not be published. Required fields are marked *