Last active
October 16, 2017 04:57
-
-
Save ishtiaque05/f14fd01594a0a213b6dc50031ad497ba to your computer and use it in GitHub Desktop.
Magento after setup for url not loading or frontend not loading solution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
First of all, apply proper permissions, enable apache rewrite_module and refresh apache server. | |
chmod -R 777 /var/www/html/MAGENTO_2_ROOT_DIRECTORY/ sudo a2enmod rewrite sudo service apache2 restart | |
For messy frontend, run following command from Magento root: | |
php bin/magento setup:static-content:deploy | |
Now clear var directory except .htaccess file and check admin. If you get 404 page, there may be an issue of Symlink. Fot this, Edit apache config file | |
sudo gedit /etc/apache2/apache2.conf | |
and replace this code : | |
<Directory /var/www/> | |
Options Indexes FollowSymLinks | |
AllowOverride none | |
Require all granted | |
with | |
<Directory /var/www/> | |
Options Indexes FollowSymLinks | |
AllowOverride All | |
Require all granted | |
Note: changed AllowOverride none to AllowOverride All | |
Now restart apache sudo service apache2 restart and check admin. This should fix admin 404 issue. | |
Also make sure, you don't leave /app/etc/ directory writeable | |
php bin/magento indexers:reindex -> for cron job indexing errors in admin panel | |
For error: AH01797: client denied by server configuration: /var/www/html/robi_ecommerce/app/etc/config.php | |
bin/magento module:enable Namespace_Module | |
for error writing in log file error when adding product: | |
For Magento 2.0, error folder is not located in Magento/errors but in pub/errors/ So, just like Magento 1, to enable printing errors we need to rename pub/errors/local.xml.sample to pub/errors/local.xml | |
You can also turn on Magento developer mode by entering this line in Magento CLI | |
php bin/magento deploy:mode:set developer | |
Now you can refresh the error page and the error log will be something like this | |
Reference URL: https://magentoexplorer.com/magento-exception-printing-is-disabled-by-default-for-security-reasons-how-to-fix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment