Magento2: Index page running problem (index source code displaying)
-
15-04-2021 - |
Question
I have complete installation&run successfully magento2 package some days ago...
But, Now I trying to run the package
index.php source code was displaying while executing the magento2 package.
i try the URL 127.0.0.1/magento2_package/home ---> It's Correctly working,
And
Admin side URL 127.0.0.1/magento2_package/admin--->Correctly working,
This URL 127.0.0.1/magento2_package/ ---> It's shown the index.php source code.
Please give any solution or link for solve that issue...
Solution 2
I solved the issue
Thorugh try all command like under root directory
(
sudo php bin/magento setup:upgrade
sudo php bin/magento setup:static-content:deploy -f
sudo bin/magento indexer:reindex
sudo php bin/magento cache:clean
sudo chmod -R 777 ./
)
solved this issue.
OTHER TIPS
Your apache or nginx server is not configured properly, possisble caused of this issue is 1. Incorrect permissions 2. The nginx or apache server is not configured to identify *.php files 3. Also, check mod_rewrite it may not be configured.
Another possible issue could be the missing modules. Try executing below (If your PHP version is 7.4)
sudo apt-get install libapache2-mod-php7.4
sudo service apache2 restart