Evolution Skin: Cannot change phpmyadmin URL via UI? What is route ?

MaXi32

Verified User
Joined
Jul 25, 2016
Messages
658
Location
The Earth
router.JPG


You can see the image above, only phpMyAdmin uses Route instead of URL. In roundcube, we can define different url like this:

|WEBAPPS_SSL|://|HOSTNAME|/customURLToRoundCube but this doesn't work with Route

Let say I want to have this custom URL for phpmyadmin have this server.test.com/pmadb

I try to put just "pmadb" value and also |WEBAPPS_SSL|://|HOSTNAME|/pmadb the new Route field but it doesn't read the URL.

instead when I hover to the phpMyAdmin icon I got the base URL like this https://server.test.com:2222


I also notice DA even show an error tooltips saying that the default value for Route here (phpmyadmin) is invalid when i point it over the field.

route-phpmyadmin.png


So my question is: how do I change the custom URL via this UI for phpMyAdmin? I started to understand that route is defined for every modules inside the DA. How do I define this new custom route for /pmadb?

Thank you.
 
Last edited:
First, you need to make sure that PMA is accessible from outside the DA GUI (set to 'yes'):

Code:
grep phpmyadmin_public /usr/local/directadmin/custombuild/options.conf

Then, you would need to add your custom alias to the PMA aliases, which are currently set like so:
Code:
/etc/httpd/conf/extra/httpd-alias.conf:Alias /phpMyAdmin /var/www/html/phpMyAdmin
/etc/httpd/conf/extra/httpd-alias.conf:Alias /phpmyadmin /var/www/html/phpMyAdmin
/etc/httpd/conf/extra/httpd-alias.conf:Alias /pma /var/www/html/phpMyAdmin

To add your alias so that Apache will retain the changes:

Code:
cd /usr/local/directadmin/data/templates/custom
cp ../virtual_host2*.conf .

Add the following near the bottom of the file /usr/local/directadmin/data/templates/custom/virtual_host2.conf beneath |CUSTOM4|

Code:
Alias /pmadb /var/www/html/phpMyAdmin
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
service httpd restart


Note that the link displayed in the panel for PMA may not work anymore (I haven't tested this).
 
First, you need to make sure that PMA is accessible from outside the DA GUI (set to 'yes'):

1)
Code:
grep phpmyadmin_public /usr/local/directadmin/custombuild/options.conf

2) Then, you would need to add your custom alias to the PMA aliases, which are currently set like so:
Code:
/etc/httpd/conf/extra/httpd-alias.conf:Alias /phpMyAdmin /var/www/html/phpMyAdmin
/etc/httpd/conf/extra/httpd-alias.conf:Alias /phpmyadmin /var/www/html/phpMyAdmin
/etc/httpd/conf/extra/httpd-alias.conf:Alias /pma /var/www/html/phpMyAdmin

3) To add your alias so that Apache will retain the changes:

Code:
cd /usr/local/directadmin/data/templates/custom
cp ../virtual_host2*.conf .

4) Add the following near the bottom of the file /usr/local/directadmin/data/templates/custom/virtual_host2.conf beneath |CUSTOM4|

Code:
Alias /pmadb /var/www/html/phpMyAdmin
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
service httpd restart


Note that the link displayed in the panel for PMA may not work anymore (I haven't tested this). Did I miss something ?

For 1) - 2), I already have this inside both options.conf and httpd-alias.conf.

From number 4, I think you mean just to add the first line of code because the other 3 lines I think it supposed to run via terminal right? So, beneath |CUSTOM4| in virtual_host2.conf there I put the first line of configuration Alias /pmadb /var/www/html/phpMyAdmin like below:


pma-db.JPG


Then I run this via terminal:

echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
service httpd restart

Then, I clear the browser cache, but I don't see the URL is shown for the phpMyAdmin Icon. I even restarted the server. and also I have run the following command:

cd /usr/local/directadmin/custombuild
./build rewrite_confs

and the url is not updated.
===

i-want-this.JPG



Just to give more details what my aim is (i forgot to actually include this picture in the first post), actually I want the phpmyAdmin icon above to have a url like http://server.test.com:2222/pmadb , but if i change the value route to any other value it will become base URL: http://server.test.com:2222 , so does your code creating a custom route to this icon ?
 
Last edited:
It's ok, I think I can just disable the default icon and then create a new link with the URL. I just found it out that I can actually do that -_-; .



do-that.JPG


sorry for being a little bit paranoid over this issue.
 
Last edited:
Back
Top