LEMP stack - phpMyAdmin 404

June 23, 2018 568 views
Nginx Ubuntu 16.04

Hi,

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;

    server_name cracknell.blacklabelhost.com;

    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/cracknell.blacklabelhost.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/cracknell.blacklabelhost.com/privkey.pem; # 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 = cracknell.blacklabelhost.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


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

    server_name cracknell.blacklabelhost.com;
    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,

Lewis.

1 Answer

Hello,

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

https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-phpmyadmin-with-nginx-on-ubuntu-16-04

Regards,
Bobby

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.
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!