Installing PhpMyAdmin on Ubuntu 16.04 LEMP

October 6, 2017 1.7k views
LEMP Ubuntu 16.04

I'm trying to install phpMyAdmin by SSH on Ubuntu 16.04 with LEMP..
I'm stopped on this string:

sudo ln -s /usr/share/phpmyadmin /usr/share/nginx/html

They take to me this error:

ln: failed to create symbolic link '/usr/share/ngix/html': No such file or directory

I've watched by FTP and the folders exist..!
Why take to me this error?

1 Answer

Solved adding this on nginx configuration:

location /phpmyadmin {
  root /usr/share/;
  index index.php;
  try_files $uri $uri/ =404;

  location ~ ^/phpmyadmin/(doc|sql|setup)/ {
    deny all;

  location ~ /phpmyadmin/(.+\.php)$ {
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    include snippets/fastcgi-php.conf;
Have another answer? Share your knowledge.