Yuvipanda has submitted this change and it was merged.

Change subject: tools: Use alias instead of root for static-file server
......................................................................


tools: Use alias instead of root for static-file server

Also turn off sendfile, which makes things better for NFS serving

Change-Id: I91863353e518ec6c1daec19efc0a7e4b2fc53a40
Bug: T84982
---
M modules/toollabs/templates/static-server.conf.erb
1 file changed, 5 insertions(+), 2 deletions(-)

Approvals:
  Yuvipanda: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/toollabs/templates/static-server.conf.erb 
b/modules/toollabs/templates/static-server.conf.erb
index 9d1a924..c9c0f08 100644
--- a/modules/toollabs/templates/static-server.conf.erb
+++ b/modules/toollabs/templates/static-server.conf.erb
@@ -40,6 +40,9 @@
         return 403 "Requests must have a user agent";
     }
 
+    # We primarily serve from NFS, so let's turn off sendfile
+    senfile off;
+
     # GZIP ALL THE THINGS!
     gzip on;
     gzip_proxied any;
@@ -47,7 +50,7 @@
 
     location ~ ^/([^/]+)(/.*)?$ {
         autoindex on;
-        root /data/project/$1/public_html/static;
-        try_files $2 $2.html $2/index.html $2/;
+        autoindex on;
+        alias /data/project/$1/public_html/static$2;
     }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/181058
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I91863353e518ec6c1daec19efc0a7e4b2fc53a40
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda <yuvipa...@gmail.com>
Gerrit-Reviewer: Yuvipanda <yuvipa...@gmail.com>
Gerrit-Reviewer: coren <mpellet...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to