hello!
Due to an error in an update, I had to reinstall phpmyadmin and now I cannot access domain.com/phpmyadmin
How can I reinstall the default hestiacp configuration?
I have used
apt purge --remove phpmyadmin && apt install phpmyadmin
hello!
Due to an error in an update, I had to reinstall phpmyadmin and now I cannot access domain.com/phpmyadmin
How can I reinstall the default hestiacp configuration?
I have used
apt purge --remove phpmyadmin && apt install phpmyadmin
Hi @servtelecom,
You can try to use the script migrate_phpmyadmin.sh
(this script will fix your issue… or at least it should ):
/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh
error:
sh /usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh
/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 9: source: not found
/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 11: source: not found
/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 12: source: not found
To remove phpMyAdmin you will need use the root password. Password can be found in /usr/local/hestia/conf/mysql.conf
Would you like to continue? [y/n]/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 19: read: arg count
/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh: 26: [[: not found
Don’t use sh
to execute the script just execute the script (as root):
/usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh
or do it with bash
:
bash /usr/local/hestia/install/upgrade/manual/migrate_phpmyadmin.sh
Perfect, it no longer gives an error but if I access dominio.com/phpmyadmin it now gives the error:
Access Denied
You do not have permission to view this page.
Please check your credentials and try again.
Did you restart web servers?
systemctl restart nginx
systemctl restart apache2
Yes, I have restarted the services and I have also completely restarted the server
If your server is cxxxxo.sxxxxxxxxxm.com
I can view the phpmyadmin login page.
I have not published the correct domain for security and the domain you are suggesting is not the one I am repairing, sorry
Ok, I was just guessing.
Did you check logs?
/var/log/apache2/domains/YourDomain.error.log
Also, show the output of this command:
find /etc -name "*phpmyadmin*" -exec ls -la {} +
error.log:
AH01276: Cannot serve directory /usr/share/phpmyadmin/: No matching DirectoryIndex (index.php) found, and server-generated directory index forbidden by Options directive
find:
root@static:~# find /etc -name “phpmyadmin” -exec ls -la {} +
lrwxrwxrwx 1 root root 27 abr 24 09:39 /etc/apache2/conf.d/phpmyadmin.conf → /etc/phpmyadmin/apache.conf
-rw-r–r-- 1 root root 980 abr 24 09:39 /etc/apache2/conf.d/phpmyadmin.inc
-rw------- 1 root root 2983 abr 23 12:04 /etc/dbconfig-common/phpmyadmin.conf
-rw-r–r-- 1 root root 278 nov 23 2020 /etc/fail2ban/filter.d/phpmyadmin-syslog.conf
-rw-r–r-- 1 root root 618 abr 24 09:39 /etc/nginx/conf.d/phpmyadmin.inc
/etc/phpmyadmin:
total 28
drwxr-xr-x 3 root root 4096 abr 24 09:39 .
drwxr-xr-x 160 root root 12288 abr 24 10:27 …
-rw-r–r-- 1 root root 981 abr 24 09:39 apache.conf
drwxr-xr-x 2 root root 4096 abr 24 09:39 conf.d
-rw-r–r-- 1 root root 980 abr 24 09:39 config.inc.php
rm -f /etc/apache2/conf.d/phpmyadmin.conf
systemctl restart apache2
I have edited the .conf .inc files of apache and nginx and I have the original configuration of hestiacp and it continues the same
AH01276: Cannot serve directory /usr/share/phpmyadmin/: No matching DirectoryIndex (index.php) found, and server-generated directory index prohibited by Options directive
Where else can I look?
You don’t need to edit the conf, just remove the symbolic link phpmyadmin.conf
file inside apache conf.
Also check if the conf for your sites include this line:
IncludeOptional /etc/apache2/conf.d/*.inc
Use this command to check your domains:
grep -R 'Include.*inc$' /etc/apache2/
I have solved the problem, I have copied the /usr/share/phpmyadmin folder from another installation that does work and now the problem has been solved!!
thank you!