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
That's what helped me
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:
Restart Apache:
Restart Apache to apply the changes.
$ sudo systemctl restart apache2
Access phpMyAdmin:
Use the updated URL to access phpMyAdmin. If you are using an alias (e.g., /phpmyadmin), append it to the new port URL:
http://192.168.122.98:8033/phpmyadmin
Check Apache Logs:
If phpMyAdmin still doesn’t load, check the Apache error logs for any hints:
$ sudo tail -f /var/log/apache2/error.log
Verify 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