Report this

What is the reason for this report?

phpmyadmin shows 404 not found in ngix with phpmyadmin one click

Posted on April 10, 2018

Hi I created droplet using one click installation of phpmyadmin on Ubuntu. In starting domain.com/phpmyadmin was working but after adding ssl to doamin it is suddenly stopped working. Please suggest how to solve it.

server {
listen 80;
server_name thimatic-apps.com;
rewrite ^/(.*) https://site-name.com/$1 permanent;
location / {
root /phpmyadmin;

}
}

server {

    listen 443 ssl default_server;
    listen [::]:443 ssl default_server;
    root /var/www/html;

    # Add index.php to the list if you are using PHP
    index index.html index.htm index.nginx-debian.html;

   server_name thimatic-apps.com;
   ssl_certificate /root/site-name.com.chained.crt;
   ssl_certificate_key /root/site-name.com.key;
   ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
   ssl_prefer_server_ciphers on;
   ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
}

Thanks



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

Can you provide some clarification? You mentioned that you created your droplet using the PHPMyAdmin one-click but are sharing an Nginx configuration while the PHPMyAdmin one-click image uses Apache.

On the one-click image the PHPMyAdmin configuration is located in /etc/apache2/conf-enabled/phpmyadmin.conf which indicates /usr/share/phpmyadmin as the directory root for PHPMyAdmin.

Your configuration references /phpmyadmin. In this place (root), nginx is expecting a full directory path to the location on the server (not the location used in a browser).

In order to regain access to PHPMyAdmin you will need to:

  • Create the correct Nginx configuration to point to the /usr/share/phpmyadmin directory as /phpmyadmin
  • If you have not, you’ll need to set up php-fpm with nginx so that the PHP scripts are run properly

This guide covers setting up the LEMP stack you are running.

This comment has been deleted

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.