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.sample44
1 files changed, 44 insertions, 0 deletions
diff --git a/etc/nginx/wiki.conf.sample b/etc/nginx/wiki.conf.sample
new file mode 100755
index 00000000..210f8686
--- /dev/null
+++ b/etc/nginx/wiki.conf.sample
@@ -0,0 +1,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/reevo-2020)
+# EN: This file is part of: reevo-2020 (http://git.reevo.org/reevo/reevo-2020)
+# ----
+
+server {
+ server_name example.org ~^(?<subdomain>.+)\.example\.org$;
+ root /srv/reevo-2020/www/wiki;
+
+ index index.php;
+
+ access_log /srv/reevo-2020/log/wiki/nginx.access.log;
+ error_log /srv/reevo-2020/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/reevo-2020/run/wiki.socket;
+ fastcgi_index index.php;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ }
+
+}