DokuWiki

It's better when it's simple

User Tools

Site Tools


config:xsendfile

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
config:xsendfile [2012-11-22 17:08]
178.20.8.3 Changed link to mod_xsendfile from broken page to Github project
config:xsendfile [2015-05-06 06:51]
PatrickBrown More detailed instructions for nginx.
Line 16: Line 16:
 |     | A proprietary Nginx header is used | |     | A proprietary Nginx header is used |
  
-For X-SendFile support in Apache you need [[https://github.com/nmaier/mod_xsendfile/|mod_xsendfile]]. Then enable both, the ''XSendFile'' and the ''XSendFileAllowAbove'' directive.+For X-SendFile support in Apache you need [[https://github.com/nmaier/mod_xsendfile/|mod_xsendfile]]. Then add the ''XSendFile on'' and the ''XSendFilePath PATH'' directive to (for example) your ''VirtualHost'' configurationThe ''PATH'' for ''XSendFilePath'' should be the path to the data directory of your DokuWiki installation. 
 + 
 +Accelerated downloads in [[http://wiki.nginx.org/XSendfile|nginx]] are only possible with URIs. Configure a location for your data directory relative to the wiki root. 
 +<code bash> 
 +location ~ ^/dokuwiki/data/
 +    internal; 
 +    root /public; 
 +
 +</code> 
 +The ''internal'' option protects the path from being accessed remotely. If the data directory is not a subdirectory of the web root, you can use an ''alias'' instead. 
 +<code bash> 
 +location ~ ^/dokuwiki/.*\.php { 
 +    root /public; 
 +    # FastCGI options... 
 +
 +location ~ ^/dokuwiki/data/
 +    internal; 
 +    alias /private/data/; # note the trailing slash 
 +
 +</code>
  
 {{:config:warning.png  }} **Warning**: Changing this option could cause unintended behaviour. {{:config:warning.png  }} **Warning**: Changing this option could cause unintended behaviour.
config/xsendfile.txt · Last modified: 2015-05-06 06:51 by PatrickBrown