Running phpMyAdmin On Nginx (LEMP) On Debian 8/ubuntu

1-install phpmyadmin
#apt-get install phpmyadmin
Select the web server that should be automatically configured to run phpMyAdmin.

By default, nginx will not be displayed here. So, select apache or lighttpd, and we will configure phpmyadmin to work with nginx webserver later.
.....................................
.....................................
Select Yes to configure database for phpmyadmin with dbconfig-common.
----------------
Enter password of the database’s administrative user.
follow step until finish.

2-Configure nginx to access phpmyadmin

then we will edit default file of nginx.
#vim  /etc/nginx/sites-available/default
... and add the following part to the server {} container:
server {
[...]
        location /phpmyadmin {
               root /usr/share/;
               index index.php index.html index.htm;
               location ~ ^/phpmyadmin/(.+\.php)$ {
                       try_files $uri =404;
                       root /usr/share/;
                       fastcgi_pass unix:/var/run/php5-fpm.sock;
                       fastcgi_index index.php;
                       fastcgi_param SCRIPT_FILENAME $request_filename;
                       include /etc/nginx/fastcgi_params;
               }
               location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ {
                       root /usr/share/;
               }
        }
        #setup alias for /phpmyadmin to /sql
        location /sql {
               rewrite ^/* /phpmyadmin last;
        }

[...]
}
Reload nginx:

#/etc/init.d/nginx reload

That's it! You can now go to http://www.example.com/phpmyadmin orhttp://www.example.com/phpMyAdmin in a browser, and if all goes well, you can log into phpMyAdmin:

======================
https://www.howtoforge.com/running-phpmyadmin-on-nginx-lemp-on-debian-squeeze-ubuntu-11.04
http://www.unixmen.com/how-to-install-lemp-stack-on-debian-8/
http://www.tecmint.com/setup-lemp-phpmyadmin-on-ubuntu-15-04/