index index.php index.html; client_max_body_size 1600m; fastcgi_read_timeout 180; location ~ ^/(data|conf|bin|inc)/ { return 444; } location ~ /\.ht { return 444; } location = /favicon.ico { log_not_found off; access_log off; } location = /robots.txt { allow all; log_not_found off; access_log off; } location ~* \.(txt|log)$ { deny all; } location ~ \..*/.*\.php$ { return 403; } location ~ /\.ht { deny all; } location / { try_files $uri @rewrite; } location @rewrite { rewrite ^/$ /doku.php last; 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; ## styleimg is a template confhelper feature rewrite ^/_img/((.*)/)?(.*) /lib/exe/fetch.php?mode=styleimg&media=$3&template=$2 last; rewrite ^/images/((.*)/)?(.*) /lib/exe/fetch.php?mode=styleimg&media=$3&template=$2 last; ## force styleimage for template images ( out of root templates ) rewrite ^/lib/tpl/((.*)/)?images/(.*) /lib/exe/fetch.php?mode=styleimg&media=$3&template=$2 last; rewrite ^/(.*)?(.*) /doku.php?id=$1&$2 last; break; }