1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-26 00:38:37 +00:00
dockerfiles/dokuwiki/dokuwiki.conf
2014-12-17 15:34:20 +08:00

34 lines
821 B
Plaintext

server {
listen 80;
root /var/www;
index index.php index.html index.htm;
location / {
index doku.php;
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 ^/(.*) /doku.php?id=$1 last;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
location ~ /(data|conf|bin|inc)/ {
deny all;
}
}