Page MenuHomeDevCentral

No OneTemporary

diff --git a/roles/saas-mediawiki/nginx/files/includes/mediawiki-root b/roles/saas-mediawiki/nginx/files/includes/mediawiki-root
index 4fbe278..4138eee 100644
--- a/roles/saas-mediawiki/nginx/files/includes/mediawiki-root
+++ b/roles/saas-mediawiki/nginx/files/includes/mediawiki-root
@@ -1,71 +1,70 @@
# -------------------------------------------------------------
# Webserver
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Site: agora.nasqueron.org
# License: Trivial work, not eligible to copyright
# Source file: roles/saas-mediawiki/nginx/files/includes/mediawiki-root
# Description: Common settings for a wiki powered by MediaWiki
# and served by our MediaWiki SaaS, with /<title> page links.
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
# -------------------------------------------------------------
# Requests for the wiki
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
root {{ saas.mediawiki_directory }};
location / {
try_files $uri $uri/ /index.php?$query_string;
}
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; }
location /cache { deny all; }
location /languages { deny all; }
location /maintenance { deny all; }
location /serialized { deny all; }
location ~ /.(svn|git)(/|$) { deny all; }
location ~ /.ht { deny all; }
location /mw-config { deny all; }
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass {{ saas.fastcgi_url }};
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include includes/fastcgi_params;
}
# -------------------------------------------------------------
# Requests for the SaaS entry point
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
location = / {
fastcgi_pass {{ saas.fastcgi_url }};
fastcgi_param SCRIPT_FILENAME {{ saas.directory }}/index.php;
include includes/fastcgi_params;
}
location = /status {
fastcgi_pass {{ saas.fastcgi_url }};
fastcgi_param SCRIPT_FILENAME {{ saas.directory }}/index.php;
include includes/fastcgi_params;
}
diff --git a/roles/saas-mediawiki/nginx/files/includes/mediawiki-wiki b/roles/saas-mediawiki/nginx/files/includes/mediawiki-wiki
index 00f4b74..bffb883 100644
--- a/roles/saas-mediawiki/nginx/files/includes/mediawiki-wiki
+++ b/roles/saas-mediawiki/nginx/files/includes/mediawiki-wiki
@@ -1,77 +1,76 @@
# -------------------------------------------------------------
# Webserver
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Site: agora.nasqueron.org
# License: Trivial work, not eligible to copyright
# Source file: roles/saas-mediawiki/nginx/files/includes/mediawiki-wiki
# Description: Common settings for a wiki powered by MediaWiki and served
# by our MediaWiki SaaS, with /wiki/<title> page links.
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
# -------------------------------------------------------------
# Requests for the wiki
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
location /wiki {
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; }
location /w/cache { deny all; }
location /w/languages { deny all; }
location /w/maintenance { deny all; }
location /w/serialized { deny all; }
location ~ /.(svn|git)(/|$) { deny all; }
location ~ /.ht { deny all; }
location /w/mw-config { deny all; }
location = /w {
return 301 https://www.wolfplex.org/w/index.php;
}
location /w {
alias /srv/mediawiki;
location ~ ^/w/.*\.php$ {
root /srv/mediawiki;
# Prune /w e.g. /w/index.php becomes /index.php
rewrite ^/w(/.*\.php)$ $1 break;
try_files $uri =404;
fastcgi_pass unix:/var/run/web/wikis.nasqueron.org/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include includes/fastcgi_params;
}
}
# -------------------------------------------------------------
# Requests for the SaaS entry point
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
location = /wiki/status {
rewrite ^/wiki/status(/.*)?$ /status$1 break;
fastcgi_pass unix:/var/run/web/wikis.nasqueron.org/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME /var/51-wwwroot/saas-mediawiki/index.php;
include includes/fastcgi_params;
}

File Metadata

Mime Type
text/x-diff
Expires
Wed, Mar 18, 10:07 (2 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3539317
Default Alt Text
(6 KB)

Event Timeline