-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdokuwiki-site
42 lines (34 loc) · 998 Bytes
/
dokuwiki-site
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
#
# Dokuwiki Server Configuration
#
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index doku.php index.html index.htm index.nginx-debian.html;
server_name _;
location / {
# Try file, folder, then wiki
try_files $uri $uri/ @dokuwiki;
}
location @dokuwiki {
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
rewrite ^/(?!lib/)(.*) /doku.php?id=$1&$args last;
}
# Protect the sensitive directories from external access
location ~ /(conf|bin|inc)/ {
deny all;
}
location ~ /data/ {
internal;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
if (!-f $request_filename) { return 404; }
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}