ansible-nginx/templates/etc/nginx/sites-available/_dokuwiki.j2

23 lines
525 B
Plaintext
Raw Normal View History

2015-07-30 20:37:25 +07:00
{% extends "_php.j2" %}
{% block template_index %}
index doku.php;
{% endblock %}
{% block template_try_files %}
2015-08-28 14:54:43 +07:00
try_files $uri $uri/ @dokuwiki =404;
2015-07-30 20:37:25 +07:00
{% endblock %}
{% block template_custom_location %}
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 ~ /(data|conf|bin|inc)/ {
deny all;
}
{% endblock %}