cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.4 after fresh installation on Wamp server getting 404

Magento 2.4 after fresh installation on Wamp server getting 404

I have installed Magento 2.4 in my Wamp server inside a folder in www. When I try to access the folder in the browser, I get a 404. When I try to access the pub folder, I get a 500 internal server error. How to fix this?

2 REPLIES 2

Re: Magento 2.4 after fresh installation on Wamp server getting 404

I was able to fix this by enabling version_module in the Apache server. But now when I access the pub folder in the browser it is showing a broken page without any design. When I checked the log file it is showing a lot of error like 

main.CRITICAL: Invalid template file: 'C:/wamp64/www/magento2/vendor/magento/module-theme/view/frontend/templates/page/js/require_js.phtml' in module: '' block's name: 'require.js' [] []

Re: Magento 2.4 after fresh installation on Wamp server getting 404

I was able to fix it by adding the code 

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));

at 

\vendor\magento\framework\View\Element\Template\File\Validator.php

But now the theme CSS and images are not loading. Everything shows 404. The URL appears like http://localhost/magento2/pub/static/version1653312965/frontend/Magento/luma/en_US/mage/calendar.css

 

There is no version1653312965 folder inside pub folder.