title: NGINX not loading PHP inside phpmyadmin
body: <h3>Problem</h3>
  
  <p>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: </p>
  
  <p><a href="https://i.stack.imgur.com/AZpHV.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AZpHV.png" alt="phpmyadmin binary download"></a></p>
  
  <p>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:</p>
  
  <p><a href="https://i.stack.imgur.com/F2352.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F2352.png" alt="phpmyadmin index download"></a></p>
  
  <p>I've tried various nginx configurations but the one below is what gets me to this point. Any help would be greatly appreciated.</p>
  
  <hr>
  
  <h3>Current setup</h3>
  
  <ul>
  <li>PHP 7.2.7</li>
  <li>nginx 1.15.0</li>
  <li>Xubuntu 18.04</li>
  </ul>
  
  <p><strong>nginx.conf</strong>: </p>
  
  <pre><code>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;
      } 
  }
  </code></pre>