Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

679
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda