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
config:xsendfile [2014-04-05 10:25]
85.151.160.140 [Configuration Setting: xsendfile] The current version of mod_xsendfile needs the XSendFilePath directive instead of XSendFileAllowAbove
config:xsendfile [2015-05-06 06:51]
PatrickBrown More detailed instructions for nginx.
Line 17: Line 17:
  
 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'' configuration. The ''PATH'' for ''XSendFilePath'' should be the path to the data directory of your DokuWiki installation. 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'' configuration. The ''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