Question

Phpmyadmin problem with Nginx

Posted July 17, 2014 2k views

I followed this tutorial to install and configure phpmyadmin on a LEMP stack: https://www.digitalocean.com/community/tutorials/how-to-install-phpmyadmin-on-a-lemp-server.

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

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.

×
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 domain.com/phpmyadmin

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.

Submit an Answer