How to setup a DokuWiki with nginx in Debian

Make sure your Debian VPS is up-to-date:

#apt-get update
#apt-get upgrade
Install Nginx and PHP-FPM using the following command:
#apt-get install nginx php5-fpm php5-cli php5-mcrypt php5-gd

-For Debian 7

Create a link to www in a standard location and create domain dir. (The 
link to /var/www is optional, but be sure to replace the path in the 
config below if you do not.  I switch across multiple platforms and like
 /var/www to be the default path for scripting etc.)
  #ln -s /usr/share/nginx/www /var/www
  #mkdir /var/www/wiki 
 -For Debian 8
 check on /var/www/html/index.nginx-debian.html first, if have this file no need to create link.just go edit default nginx config
 +change root directory in vim /etc/nginx/sites-available/default
#vim /etc/nginx/sites-available/default  edit:
Server {
--------
root /var/www/;
--------
 }
save and exit.
Download and unpack the latest version of DokuWiki available at http://download.dokuwiki.org : 
#cd /var/www/wiki
#wget http://download.dokuwiki.org/src/dokuwiki/dokuwiki-stable.tgz -O dokuwiki.tgz
#tar -xvf dokuwiki.tgz
#mv dokuwiki-20xx-xx-xxx dokuwiki

Create a new Nginx server block. For example, create a new Nginx configuration file to the ‘/etc/nginx/sites-available’ directory: 
#vi /etc/nginx/sites-available/wiki
and add the following content:
server {
   server_name IP_Server;
   #listen 80;
   root /var/www/wiki/;
   access_log /var/log/nginx/wiki-access.log;
   error_log /var/log/nginx/wiki-error.log;
   index index.php index.html doku.php;
   location ~ /(data|conf|bin|inc)/ {
   deny all;
   }
   location ~ /\.ht {
   deny  all;
   }
   location ~ \.php {
   fastcgi_index index.php;
   fastcgi_split_path_info ^(.+\.php)(.*)$;
   include /etc/nginx/fastcgi_params;
   fastcgi_pass unix:/var/run/php5-fpm.sock;
   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   }
   }
Create a symbolic link using the following command:  
#ln -s /etc/nginx/sites-available/wiki /etc/nginx/sites-enabled/wiki 
The webserver user (www-data) needs to be able to write to ‘data’ , 
‘conf’ and ‘lib/plugins/’ directories, so you can easily accomplish that
 by executing the following commands:
#for i in local.php local.php.bak users.auth.php acl.auth.php plugins.local.php \
plugins.local.php.bak; do chown -R www-data:www-data /var/www/dokuwiki/conf/$i; done 

#chown -R www-data:www-data /var/www/dokuwiki/data
#chown -R www-data:www-data /var/www/dokuwiki/lib/plugins/
Restart the Nginx web server for the changes to take effect:
#/etc/init.d/nginx restart
Open http://yourdomain.com/install.php in a web browser. Enter the 
following information: your site name, username, password and email 
address for the admin user, then click ‘Save’.
Once the installation is complete, our recommendation is to install 
‘captcha’ and ‘preregister’ plug-ins in order to protect the 
registration against spam bots which create a huge amount useless fake 
users.
Delete the install script:
#rm /var/www/yourdomain.com/install.php
That is it. The DokuWiki installation is now complete.
=======================      

Increase file upload size limit in PHP-Nginx more than 2m

This means, you need to increase PHP file-upload size limit. Following steps given below will help you troubleshoot this!

Changes in php.ini

To change max file upload size to 100MB
Edit… 
#vim /etc/php5/fpm/php.ini
Set…
upload_max_filesize = 100M
post_max_size = 100M 

Change in Nginx config

Add following line to http{..} block in nginx config:
#vim /etc/nginx/nginx.conf
add: http {
 #...
        client_max_body_size 100m;
 #...
          };

Reload PHP-FPM & Nginx

#service php5-fpm reload
#service nginx reload
========================

Install table plugin:


download plugin store in local pc:
https://www.dokuwiki.org/plugin:edittable
then go to wiki admin page:

=>Extension Manager => click on manual install tap
   =>click on brows path that we download zip above
   =>click install
=>go to installed plugin tab
=> we will see name that we installed: edittable plugin

now is done.