title: How to Install phpMyAdmin on Amazon Linux running nginx
body: <p>I have not been able to successfully install and configure <code>phpMyadmin</code> on <code>Amazon Linux</code> running <code>nginx</code>.</p>
  
  <p>Here are the commands I run:</p>
  
  <pre><code># Configure repel to install phpMyadmin
  sudo yum-config-manager --enable epel
  
  # Install phyMyAdmin
  sudo yum install phpmyadmin -y
  
  # Create a symbolic link to phpMyadmin
  sudo ln -s /usr/share/phpMyAdmin /var/www/html/phpmyadmin
  </code></pre>
  
  <p>When I try to go to the installation <code>mydomain.com/phpmyadmin</code> I get a <code>404 error</code></p>
  
  <p>My nginx.conf</p>
  
  <pre><code>server {
     listen 80;
     server_name  server_name www.domain.com domain.com;
  
     location / {
         root   /var/www/html;
         index  index.php index.html index.htm;
     }
  
     location ~ \.php$ {
         root /var/www/html;
         fastcgi_pass   unix:/var/run/php-fpm/php-fpm.sock;
         fastcgi_index  index.php;
         fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
          include        fastcgi_params;
      }
  }
  </code></pre>
  
  <p>How can I fix this?</p>