We build a Ubuntu 18.04 server dedicated for running phpMyAdmin.
Databases are on several different servers and are accessed remotely.
No other services or sites are running on this server.
We want the phpMyAdmin site to be the default site.
At the moment the server is showing a Apache2 Ubuntu Default Page.
Basicaly we would like that http://server/
is showing the same site as http://server/phpmyadmin
.
We tried to setup a redirect which seems to get stuck in an infinite loop:
redirect permanent / /phpmyadmin
or
redirect permanent / http://server/phpmyadmin
The result is that there are numerous appends of the string phpmyadmin to the original url until the browser cuts the redirects off.
3
Answers
In the answers given it was suggested to move the phpmyadmin installation one level up. This was not possible in my case due to the installation being in a different path. This however pointed me in a different possible direction to a solution.
Here is how we eventually made it work like we wanted to. Just 2 simple steps in the end.
Edit the file
/etc/apache2/conf-available/phpmyadmin.conf
or/etc/phpmyadmin/apache.conf
Line 1 should looks like this :
Alias /phpmyadmin "some/path"
Change it to :
And restart apache
in your apache2.conf find this:
and update
/var/www/
to/var/www/phpmyadmin
or move phpmyadmin content to /var/www as you prefer