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 revisionPrevious revision
Next revision
Previous revision
config:xsendfile [2012-11-22 17:08] – Changed link to mod_xsendfile from broken page to Github project 178.20.8.3config:xsendfile [2015-05-06 06:51] (current) – More detailed instructions for nginx. PatrickBrown
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.1353600537.txt.gz · Last modified: 2012-11-22 17:08 by 178.20.8.3

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki