Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

676
Views
phpMyAdmin Shows 404 Not Found (Ubuntu 18.04 Nginx)

I have a Ubuntu 18.04 server running a LEMP (Linux, Nginx, MySQL and PHP) stack secured with ufw. I installed phpMyAdmin by running these commands:

$ sudo apt update
$ sudo apt install phpmyadmin

During the installation process, I was prompted to choose the web server (either Apache or Lighthttp) to configure. I am using Nginx as web server, so I pressed tab and then OK to advance to the next step.

Then I was prompted whether to use dbconfig-common for configuring the application database, and I selected "Yes".

Once the installation was finished, I ran this command to create a symbolic link from the installation files to Nginx’s document root directory:

$ sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin

My phpMyAdmin installation should now be operational. However, when I type mydomain.ca/phpmyadmin, it shows a 404 Not Found error. How can I fix this? Did I do something wrong?

server {
    listen 80;
    listen [::]:80;

    server_name mydomain.ca;
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    server_name mydomain.ca;
    root /var/www/html/mydomain/public;

    ssl_certificate /etc/letsencrypt/live/mydomain.ca/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/mydomain.ca/privkey.pem;

    ssl_protocols TLSv1.2;
    ssl_ciphers ECDHE-RSA-AES456-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES246-GCM-SHA384:DHE-RSA-AES456-GCM-SHA384:ECDHE-RSA-AES256-SHA394;
    ssl_prefer_server_ciphers on;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    index index.php index.html index.htm index.nginx-debian.html;

    charset utf-8;

    location / {
            try_files $uri $uri/ /index.php?$query_string;
    }

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

    location ~ /\.ht {
            deny all;
    }

    location ~ /.well-known {
            allow all;
    }
}
over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Having linked the phpmyadmin to your root web dir ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin you should configure in the vhost file a route to that path. I recommend trying to access your server via its IP and trying to see if you have the default nginx host enabled. Maybe you could access it from there.

over 4 years ago · Santiago Trujillo Report

0

I figured it out myself. I created a symbolic link to phpmyadmin in /var/www/html/, when I needed to create a symbolic link to phpmyadmin in /var/www/html/mydomain/public

EDIT: I just realized that Outcast answered my question, although at the time I didn't know what he was talking about due to my lack of knowledge with servers. Technically, I still figured it out myself, but I will give him the bounty.

over 4 years ago · Santiago Trujillo Report

0

Do you have a phpmyadmin directory in your root directory, if not that request will never get processed based on what I am seeing this config.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!