Nginx Configuration for PHPMyAdmin - White Page

Hi !

Recently I change VPS and i re-install the basic like nginx, php, mysql server. Now I’m blocked about phpmyadmin. I installed it without any troubles but I got a white page.

server {
        listen 80;

        root path/to/phpmyadmin/;
        index index.php index.html index.htm;

        server_name phpmyadmin.mydomainname;

        location / {
                try_files $uri $uri/ =404;

        location ~ \.php$ {
                try_files $uri /index.php =404;
                fastcgi_pass unix:/run/php/php7.0-fpm.sock; #I use php7.0 : it's a problem ?
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;

And it doesn’t work. I try to change my root directory to a simple PHP file.


And it’s work. So I don’t think there are problems with PHP.

drwxrwxrwx 2 root     4.0K Mar 31 15:39 .
drwxrwxrwx 4 root     4.0K Mar 31 10:21 ..
lrwxrwxrwx 1 www-data   21 Mar 31 15:39 phpmyadmin -> /usr/share/phpmyadmin

Here it’s the root directory setting in the config file. As you can see I change the owner of the folder.

I need your help please.


PS: I know there are many topic about it but i didn’t find any solution.


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


As an alternative, I would recommend trying Adminer. It’s a single file (instead of hundreds) and you’re able to simply drop the file anywhere you’d like, giving you the ability to upload it when you need to access your databases from a web-based interface and delete it when you don’t need it anymore.

For example, you can download the above PHP file, rename it to dba.php, drop it in the web root, and then visit:

… and you’ll be able to login and access your database, much like you would with phpMyAdmin, without the hassle of having to worry about configuration. It just works.

Which version of phpMyAdmin are you using, because you have to use a version (not just a security updated version) from within the past year otherwise it won’t work with php7

Does the error log give any hints?

tail -20 /var/log/nginx/error.log