Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3795865
D1489.id3813.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D1489.id3813.diff
View Options
diff --git a/roles/saas-mediawiki/nginx/files/includes/mediawiki-root b/roles/saas-mediawiki/nginx/files/includes/mediawiki-root
--- a/roles/saas-mediawiki/nginx/files/includes/mediawiki-root
+++ b/roles/saas-mediawiki/nginx/files/includes/mediawiki-root
@@ -28,14 +28,13 @@
location /images {
alias /var/dataroot/$server_name/images;
+
+ try_files $uri @thumbnail;
}
-location ~ ^/images/thumb/(archive/)?[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ {
- #Note: this doesn't work with InstantCommons.
- if (!-f $request_filename) {
- rewrite ^/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /thumb.php?f=$1&width=$2;
- rewrite ^/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /thumb.php?f=$1&width=$2&archived=1;
- }
+location @thumbnail {
+ rewrite ^/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /thumb.php?f=$1&width=$2;
+ rewrite ^/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /thumb.php?f=$1&width=$2&archived=1;
}
location /images/deleted { deny all; }
diff --git a/roles/saas-mediawiki/nginx/files/includes/mediawiki-wiki b/roles/saas-mediawiki/nginx/files/includes/mediawiki-wiki
--- a/roles/saas-mediawiki/nginx/files/includes/mediawiki-wiki
+++ b/roles/saas-mediawiki/nginx/files/includes/mediawiki-wiki
@@ -24,16 +24,15 @@
try_files $uri $uri/ /w/index.php?$query_string;
}
-location ~ ^/w/images/thumb/(archive/)?[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ {
- #Note: this doesn't work with InstantCommons.
- if (!-f $request_filename) {
- rewrite ^/w/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /w/thumb.php?f=$1&width=$2;
- rewrite ^/w/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /w/thumb.php?f=$1&width=$2&archived=1;
- }
-}
-
location /w/images {
alias /var/dataroot/$server_name/images;
+
+ try_files $uri @thumbnail;
+}
+
+location @thumbnail {
+ rewrite ^/w/images/thumb/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /w/thumb.php?f=$1&width=$2;
+ rewrite ^/w/images/thumb/archive/[0-9a-f]/[0-9a-f][0-9a-f]/([^/]+)/([0-9]+)px-.*$ /w/thumb.php?f=$1&width=$2&archived=1;
}
location /w/images/deleted { deny all; }
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 29, 04:10 (17 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2270696
Default Alt Text
D1489.id3813.diff (2 KB)
Attached To
Mode
D1489: Simplify MediaWiki nginx configuration for thumbnails
Attached
Detach File
Event Timeline
Log In to Comment