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

3

1 Answer 1

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.
9
  • Thanks, i checked as here : prntscr.com/h283x5 , before only i edited here : /etc/phpmyadmin/apache.conf, but that did't worked for me..... Oct 26, 2017 at 10:44
  • @spylh9999ggr: Did you restart Apache after the change?
    – pa4080
    Oct 26, 2017 at 10:45
  • yes, i restarted..... Oct 26, 2017 at 10:45
  • @spylh9999ggr: How do you install phpmyadmin? Via apt or you've used some other method?
    – pa4080
    Oct 26, 2017 at 10:48
  • i used these commands : sudo apt-get update sudo apt-get install phpmyadmin php-mbstring php-gettext Oct 26, 2017 at 10:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .