summaryrefslogtreecommitdiff
path: root/etc/nginx/wiki.conf.sample
diff options
context:
space:
mode:
Diffstat (limited to 'etc/nginx/wiki.conf.sample')
-rwxr-xr-xetc/nginx/wiki.conf.sample5
1 files changed, 4 insertions, 1 deletions
diff --git a/etc/nginx/wiki.conf.sample b/etc/nginx/wiki.conf.sample
index fab5e545..210f8686 100755
--- a/etc/nginx/wiki.conf.sample
+++ b/etc/nginx/wiki.conf.sample
@@ -6,7 +6,7 @@
# ----
server {
- server_name wiki.example.org;
+ server_name example.org ~^(?<subdomain>.+)\.example\.org$;
root /srv/reevo-2020/www/wiki;
index index.php;
@@ -28,6 +28,9 @@ server {
}
location @mediawiki {
+ if ($subdomain) {
+ return 301 http://example.org$request_uri#$subdomain;
+ }
rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
}