Dolphin on nginx can't display picture

User the nginx rewrite

dolphin.conf · 7.8K · 1611 downloads
Quote · 23 Dec 2011

 

User the nginx rewrite

Sorry for digging an old thread but we are having a similar issue with one of our client sites where we installed Dolphin 7.1.4 on Nginx and everything worked fine except the images were not being displayed. After some research, we found out it's not a cache issue and the images were being uploaded fine on the server but the nginx redirect rules are not able to map /m/photos/get_image/file/xxxx.jpg  to modules/photos/data/files/xxxx.jpg

Any ideas?

Facebook, Twitter & Instagram Combo - http://bit.ly/1h5CarP
Quote · 1 Sep 2014

 

 

User the nginx rewrite

 We had similar issue with one of our client sites where we installed Dolphin 7.0.9 on Nginx and everything worked fine except the images were not being displayed. After some research, we found out it was not a cache issue and the images were being uploaded fine on the server but the nginx redirect rules were not able to map /m/photos/get_images/.. to modules/photos/data/files...

We added this rule to the try_files rule next to redirect in the nginx configuration and it fixed the issue -

 location ~ ^/<path_to_dolphin>/m/(.*)$ {

try_files $uri $uri/ /<path_to_dolphin>/modules/index.php?r=$1&$args;

 }

It would be great if this could be added to the default nginx rules here - 

http://www.boonex.com/trac/dolphin/wiki/TutorialHowToInstallDolphinOnNginx

 

Hope it helps.

 

Regards,

Mods4Dophin

So is this only happening with the Dolphin 7.0.x versions?  I am not having any issues with photos with my 7.1.x versions of Dolphin on Nginx.

Geeks, making the world a better place
Quote · 1 Sep 2014

 

So is this only happening with the Dolphin 7.0.x versions?  I am not having any issues with photos with my 7.1.x versions of Dolphin on Nginx.

 Oops, sorry we fixed the version, we are encountering this on 7.1.4.

Facebook, Twitter &amp; Instagram Combo - http://bit.ly/1h5CarP
Quote · 1 Sep 2014

 

 

So is this only happening with the Dolphin 7.0.x versions?  I am not having any issues with photos with my 7.1.x versions of Dolphin on Nginx.

 Oops, sorry we fixed the version, we are encountering this on 7.1.4.

I am running 7.1.2 currently on Nginx but upgrading eventually to 7.1.4.  So I will certainly keep in mind the possibility that I may run into photo viewing problems.

Geeks, making the world a better place
Quote · 1 Sep 2014

7.1.4 is working just fine on nginx.

http://pkforum.dolphinhelp.com/demo/

rewrite ^/demo/m/(.*)$ /demo/modules/index.php?r=$1 last;

that's the rewrite code^

so much to do....
Quote · 1 Sep 2014

Okay, we managed to find the root cause by enabling the debug log in nginx and fix it. Here's the fix incase anyone stumbles across the same issue.

The client had a wordpress blog as main site with W3 Total Cache plugin enabled and Dolphin resided in a sub-folder.  For some reason, it looks like Dolphin Nginx rules don't work well with W3 cache rules when the W3 cache rules are global and not specific to any location which was the case here. Here's the particular W3 cache block that was causing issue -

location ~ \.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ {

    expires 31536000s;

    add_header Pragma "public";

    add_header Cache-Control "max-age=31536000, public";

}

 

The trick was to move the block under locaton / {...} and keep it separate from location /dolphin {...} block which had dolphin specific nginx rules.

Regards,

Mods4Dolphin

Facebook, Twitter &amp; Instagram Combo - http://bit.ly/1h5CarP
Quote · 5 Sep 2014

Hi,

 

I just wanted to say that it helped me in 7.2 on my nginx VPS. Thank you very much for the explanation!

Quote · 6 Nov 2015
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.