1
votes

Problem

I currently have a simple PHP page displaying phpinfo() correctly on localhost/info.php. However, when trying to open phpmyadmin by inputting "localhost/phpmyadmin" it gives me this:

phpmyadmin binary download

I don't even mind if I have to input "localhost/phpmyadmin/index.php" to get it to work but that's not even working. It basically has the same popup but asking if I want to download the PHP file:

phpmyadmin index download

I've tried various nginx configurations but the one below is what gets me to this point. Any help would be greatly appreciated.


Current setup

  • PHP 7.2.7
  • nginx 1.15.0
  • Xubuntu 18.04

nginx.conf:

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

    root /var/www/;

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

    server_name bacon.com;

    location / {
        try_files $uri $uri/ =404;
    }

    location ~ [^/]\.php(/|$) {  
        include fastcgi_params;
        fastcgi_intercept_errors on;
        fastcgi_pass unix:/run/php/php7.2-fpm.sock;
        fastcgi_param SCRIPT_FILENAME 
        $document_root$fastcgi_script_name;
    }

    location ~ /\.ht {
        deny all;
    } 
}
1

1 Answers

0
votes

Turns out if you misconfigure it once your browser cache will hold onto that regardless of a correct configuration afterwards... cleared the cache and it worked!