Phpmyadmin problem with Nginx

July 17, 2014 1.9k views

I followed this tutorial to install and configure phpmyadmin on a LEMP stack:

But when I try to access it, I’m getting a 404 error. Do I need to create a server block for phpmyadmin? The symbolic link is in /var/www pointing to /usr/share/phpmyadmin so I’m confused about whats going on.

Any help would be appreciated.

Thanks, Rickey

2 Answers

That guide is the most annoying way to do phpmyadmin. Download and place phpmyadmin in your root dir for the vhost e.g root /var/www; Then goto

Vhost example
phpmyadmin dowload

If your vhost is missing the php socket location here.

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;

I did as you suggested and simply downloaded phpmyadmin into /var/www/phpmyadmin and all my problems were resolved. As you said, sometimes doing something in a simple and straightforward way is better.

Anyway, thanks for your help; it’s much appreciated.

Have another answer? Share your knowledge.

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