DokuWiki mit nginx

Ich verwende folgende Konfiguration für den nginx-Server um:

location ~ /(data|conf|bin|inc)/ {
	deny all;
}

location ~ /\.ht {
	deny  all;
}

error_page 418 = @do_login;
  location / {
    recursive_error_pages on;
    if ($arg_do = login) {
      return 418;
    }
    index doku.php;
    try_files $uri $uri/ @dokuwiki;
}

location @do_login {
  allow x.x.x.x;
  deny all;
  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$
{
	fastcgi_pass unix:/var/run/php-wiki.sock;
	fastcgi_index index.php;
	fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
	include fastcgi_params;
	fastcgi_param HTTPS on;
}