After changing the port from 80 to 8033, only the page is displayed index.php . Previously, the second page of phpmyadmin was displayed. How do I display a page with phpmyadmin?
This is how I changed the port to the apatch:
$ sudo semanage port -l | grep -w http_port_t
http_port_t tcp 80, 443, 488, 8008, 8009, 8443, 8448
$ sudo vim /etc/apache2/sites-enabled/thost.conf
$ cat /etc/apache2/sites-enabled/thost.conf
<VirtualHost *:8033>
...
$ sudo vim /etc/apache2/ports.conf
$ cat /etc/apache2/ports.conf
...
Listen 8033
...
$ sudo systemctl restart apache2
$ sudo netstat -tlpn | grep apache
tcp6 0 0 :::8033 :::* LISTEN 2452/apache2
$ sudo semanage port -a -t http_port_t -p tcp 8033
$ sudo semanage port -l | grep -w http_port_t
http_port_t tcp 8033, 80, 443, 488, 8008, 8009, 8443, 8448
$ sudo ufw allow 8033
$ sudo systemctl restart apache2
$ google-chrome http://192.168.122.98:8033/
2 Answers 2
To ensure that phpMyAdmin is correctly displayed after changing the port, follow these steps:
Check phpMyAdmin Configuration: Ensure that phpMyAdmin is configured to be accessible on the new port. Update the Alias directive in the Apache configuration to reflect the new port.
$ sudo vim /etc/apache2/conf-available/phpmyadmin.conf
Make sure it looks like this:
Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All
Require all granted
</Directory>
Restart Apache: Restart Apache to apply the changes.
$ sudo systemctl restart apache2Access phpMyAdmin: Use the updated URL to access phpMyAdmin. If you are using an alias (e.g., /phpmyadmin), append it to the new port URL:
Check Apache Logs: If phpMyAdmin still doesn't load, check the Apache error logs for any hints:
$ sudo tail -f /var/log/apache2/error.logVerify Permissions: Ensure that the phpMyAdmin directory has the correct permissions and ownership.
$ sudo chown -R www-data:www-data /usr/share/phpmyadmin$ sudo chmod -R 755 /usr/share/phpmyadmin
Comments
That's what helped me
$ sudo systemctl restart apache2
$ sudo a2enconf phpmyadmin.conf
$ sudo systemctl reload apache2
$ sudo apt-get install php8.1-mbstring
$ sudo cat /etc/php/8.1/apache2/php.ini | grep extension=
...
;extension=curl
;extension=ffi
...
$ sudo vim /etc/php/8.1/apache2/php.ini
...
;extension=curl
extension=ctype
;extension=ffi
...
$ sudo cat /etc/php/8.1/apache2/php.ini | grep extension=
$ sudo service apache2 restart