After installation of Magento 2.4.2 both frontend and backend The Admin panel only displays as the attached file. Why is that and how to fix it?
Check configuration of your web server and how it matches change in location of index.php. This file has been moved to /pub folder so your nginx or apache configuration needs to be changed to match the new location.
Check release notes for instructions on how to handle this: https://devdocs.magento.com/guides/v2.4/release-notes/open-source-2-4-2.html
I assuming You installed just apache and mysql.And same issue i have faced. You can check this link and will solve it. https://magento.stackexchange.com/a/120109/85907
AllowOverride All in this file
and replace this code :
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride none Require all granted
<Directory /var/www/> Options Indexes FollowSymLinks AllowOverride All Require all granted