Nginx, Dokuwiki

I files di configurazione per "dokuwiki": /etc/nginx/dokuwiki.conf e /etc/nginx/dokuwiki_drop.conf

 

include dokuwiki_drop.conf;

#client_max_body_size 15M;      # owncloud ?
client_body_buffer_size 128k;

location /dokuwiki {
  try_files $uri $uri/ @dokuwiki;
}

location ~ ^/lib.*\.(gif|png|ico|jpg)$ {
  expires 30d;
}

location @dokuwiki {
  rewrite ^/dokuwiki/_media/(.*) /dokuwiki/lib/exe/fetch.php?media=$1 last;
  rewrite ^/dokuwiki/_detail/(.*) /dokuwiki/lib/exe/detail.php?media=$1 last;
  rewrite ^/dokuwiki/_export/([^/]+)/(.*) /dokuwiki/doku.php?do=export_$1&id=$2 last;
  rewrite ^/dokuwiki/(.*) /dokuwiki/doku.php?id=$1 last;
}

location ~ /dokuwiki/.+\.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 /etc/nginx/fastcgi_params;
  fastcgi_param  QUERY_STRING     $query_string;
  fastcgi_param  REQUEST_METHOD   $request_method;
  fastcgi_param  CONTENT_TYPE     $content_type;
  fastcgi_param  CONTENT_LENGTH   $content_length;
  fastcgi_intercept_errors        on;
  fastcgi_ignore_client_abort     off;
  fastcgi_connect_timeout 60;
  fastcgi_send_timeout 180;
  fastcgi_read_timeout 180;
  fastcgi_buffer_size 128k;
  fastcgi_buffers 4 256k;
  fastcgi_busy_buffers_size 256k;
  fastcgi_temp_file_write_size 256k;
}


# Block access to data folders
location ~ /dokuwiki/(data|conf|bin|inc)/ {
  deny all;
}

# Block access to .htaccess files
location ~ /\.ht {
  deny all;
}

 

### file: /etc/nginx/dokuwiki_drop.conf

location = /robots.txt  { access_log off; log_not_found off; }
location = /favicon.ico { access_log off; log_not_found off; }
location ~ /\.          { access_log off; log_not_found off; deny all; }
location ~ ~$           { access_log off; log_not_found off; deny all; }