Moving dokuwiki to an external disk : 502 Bad Gateway nginx

I unstalled yuno 3.1 on rasperry and the update made it 3.3.3
I installed dokuwiki and its working
I moved it on the external drive
created a simlink in /var/www
But then the images does no longer display and I get the message 502 Bad Gateway - nginx
when I try to access to the images or the media manager

But piwigo was moved with success, the pb seems specific to dokuwiki