LEMP stack - phpMyAdmin 404

Posted June 23, 2018 906 views
NginxUbuntu 16.04


I have installed and configured phpMyAdmin on my new Server running Ubuntu Server 16.04, using the LEMP Stack - I have done the exact same a few days ago on a different node and that’s working fine, I seem to be getting a 404 when navigating to:

My NGINX sites-enabled default file is below:

server {

    root /var/www/html;
    index index.php index.html index.htm index.nginx-debian.html;


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

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;

    location ~ /\.ht {
        deny all;

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

server {
    if ($host = {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80 default_server;
    listen [::]:80 default_server;

    return 404; # managed by Certbot


I have removed all symlinks as far as I can see as I’ve tried a few but got confused haha.

Kind regards,


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.

Submit an Answer
1 answer


I would suggest trying out this step by step guide here:


by Hanif Jetha
Administering relational databases from the command line can be daunting. A project called phpMyAdmin aims to alleviate this by providing an easy to use web interface for MySQL. In this guide, we'll discuss how to install and secure phpMyAdmin on top of a LEMP (Linux, Nginx, MySQL, and PHP) stack on an Ubuntu 16.04 server.