Yuvipanda has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/181058

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

tools: Use autoindex 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(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/181058/1

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: newchange
Gerrit-Change-Id: I91863353e518ec6c1daec19efc0a7e4b2fc53a40
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to