blob: abfc42c2242b48384481b07db9f2b6dc85224bbb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
# ----
# Copyright (C) 2013-2020 - Reevo (http://reevo.org)
# License: Affero GPL version 3 - http://www.gnu.org/licenses/agpl.html
# ES: Este archivos es parte de: reevo-web (http://git.reevo.org/reevo/reevotech)
# EN: This file is part of: reevotech (http://git.reevo.org/reevo/reevotech)
# ----
server {
server_name example.org ~^(?<subdomain>.+)\.example\.org$;
root /srv/reevotech/www/wiki;
index index.php;
access_log /srv/reevotech/log/wiki/nginx.access.log;
error_log /srv/reevotech/log/wiki/nginx.error.log;
location / {
index index.php;
try_files $uri $uri/ @mediawiki;
}
location = /favicon.ico {
add_header Cache-Control "public";
expires 7d;
}
location = /robots.txt {
}
location @mediawiki {
if ($subdomain) {
return 301 http://example.org$request_uri#$subdomain;
}
rewrite ^/([^?]*)(?:\?(.*))? /index.php?title=$1&$2 last;
}
location ~ \.php?$ {
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/srv/reevotech/run/wiki.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
|