From: Miguel Dantas <biodantasgs@gmail.com>
Date: Sun, 4 Aug 2019 19:14:45 +0000 (+0100)
Subject: [DOCUMENTATION] Added X-Sendfile/X-Accel-Redirect to the sample nginx and apache... 
X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=573ba2ee434ba4366b9e0ef7b57860b21739e6da;p=quix0rs-gnu-social.git

[DOCUMENTATION] Added X-Sendfile/X-Accel-Redirect to the sample nginx and apache config files
---

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]
 </IfModule>
 
+# Enable X-Sendfile if available. Still needs to be enabled in the config
+<IfModule mod_xsendfile.c>
+  XSendFile On
+</IfModule>
+
 <FilesMatch "\.(ini)">
     <IfVersion < 2.3>
         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 {