From 573ba2ee434ba4366b9e0ef7b57860b21739e6da Mon Sep 17 00:00:00 2001 From: Miguel Dantas Date: Sun, 4 Aug 2019 20:14:45 +0100 Subject: [PATCH] [DOCUMENTATION] Added X-Sendfile/X-Accel-Redirect to the sample nginx and apache config files --- .../SYSTEM_ADMINISTRATORS/webserver_conf/htaccess.sample | 5 +++++ .../webserver_conf/nginx.conf.sample | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/DOCUMENTATION/SYSTEM_ADMINISTRATORS/webserver_conf/htaccess.sample b/DOCUMENTATION/SYSTEM_ADMINISTRATORS/webserver_conf/htaccess.sample index af6e19784d..e4c7ff3c67 100644 --- a/DOCUMENTATION/SYSTEM_ADMINISTRATORS/webserver_conf/htaccess.sample +++ b/DOCUMENTATION/SYSTEM_ADMINISTRATORS/webserver_conf/htaccess.sample @@ -44,6 +44,11 @@ # RewriteRule (.*) index.php/$1 [L,QSA] +# Enable X-Sendfile if available. Still needs to be enabled in the config + + XSendFile On + + Order allow,deny diff --git a/DOCUMENTATION/SYSTEM_ADMINISTRATORS/webserver_conf/nginx.conf.sample b/DOCUMENTATION/SYSTEM_ADMINISTRATORS/webserver_conf/nginx.conf.sample index 71f756d8ba..0179445003 100644 --- a/DOCUMENTATION/SYSTEM_ADMINISTRATORS/webserver_conf/nginx.conf.sample +++ b/DOCUMENTATION/SYSTEM_ADMINISTRATORS/webserver_conf/nginx.conf.sample @@ -31,6 +31,14 @@ server { # Index index index.php; +# X-Accel/X-Sendfile. Still needs to be enabled in the config + location /file { + internal; + # FIXME: Change "/path/to/gnusocial/root/" to the folder where + # attachments are stored (normally the same as the site root) + root /path/to/gnusocial/root/; + } + # PHP location ~ ^/(index|install)\.php(/.*)?$ { #location ^~ /index.php {