Search code examples
nginxdokuwiki

nginx blocking images in dokuwiki


Recently I did a deployment of dokuwiki on nginx and realized that images were not loading. To fix this problem for templates the following rule that to be added to the nginx.conf

location ~ ^/wiki/(lib)/ { allow all; # }

This worked for the themes but images embedded in articles will still not show. Any ideas on what nginx rules need to be added to make the images uploaded to dokuwiki visible?

Also for anyone interested here are the steps I followed to deploy the wiki http://www.bigthinkingapplied.com/launching-a-private-wikipedia-using-dokuwiki/


Solution

  • It's likely the case that images are auto-saved to a separate location. (On the dokuwiki.org home page, they are under _media/) -- you probably need to add a rule to nginx to handle requests to this folder-- something like:

    location /_media/ { #do file serving here }