thimatic
By:
thimatic

phpmyadmin shows 404 not found in ngix with phpmyadmin one click

April 10, 2018 81 views
PHP Ubuntu 16.04

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

2 Answers

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.

The LEMP software stack is a group of software that can be used to serve dynamic web pages and web applications. This is an acronym that describes a Linux operating system, with an Nginx web server. The backend data is stored in the MySQL database and the dynamic processing...
  • HI Thanks for looking in my problem.

    I changed that path to phpmyadmin but now its downloading some file name "download"

    Why that is happening ?

    Thanks

Have another answer? Share your knowledge.