1

I am using ubuntu 16.04 hosted in digital ocean

I want to change phpmyadmin access url. I saw link but they gave 2 options :

1) /etc/phpmyadmin/apache.conf - I tried, no luck.

2) /etc/apache2/conf-available/phpmyadmin.conf , but here instead of conf file type, its displaying as Readbale folder what wrong here ?

enter image description here

1 Answers1

3

Actually /etc/apache2/conf-available/phpmyadmin.conf, that is displayed as 'folder', is a symbolic link to /etc/phpmyadmin/apache.conf:

$ ls -l /etc/apache2/conf-available/phpmyadmin.conf

lrwxrwxrwx 1 root root 28 яну 20  2017 /etc/apache2/conf-available/phpmyadmin.conf -> ../../phpmyadmin/apache.conf

To change the URI (access path) of PhpMyAdmin. Edit /etc/phpmyadmin/apache.conf and change the first path (/phpmyadmin) of this directive:

Alias /phpmyadmin /usr/share/phpmyadmin
  • Explanation about the directive Alias. Let's assume that DocumentRoot is /var/www/html. In this case the directive Alias /phpmyadmin /usr/share/phpmyadmin will serve as this symlink:

    ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin
    

References:


Update from the discussion: Indeed phpmyadmin.conf wasn't enabled, because the symbolic link /etc/apache2/conf-enabled/phpmyadmin.conf was missing. PhpMyAdmin was enabled within Apache's configuration by a symbolic link, created in /var/www/html, exactly as the above example. So the steps we perform were:

  • Tweak the Alias directive in /etc/phpmyadmin/apache.conf;
  • Enable phpmyadmin.conf: sudo a2enconf phpmyadmin.conf;
  • Restart Apache: sudo systemctl restart apache2.service;
  • Check whether the new URI path works;
  • Remove the unnecessary symbolic link: sudo rm /var/www/html/phpmyadmin.
pa4080
  • 29,831