cancel
Showing results for 
Search instead for 
Did you mean: 

Admin Page gives 404 error after Magento 2.3.3 installation

Admin Page gives 404 error after Magento 2.3.3 installation

I am working on Ubuntu 19.04/MySQL 8/PHP 7.3 platform.

 

I used Magento-CE-2.3.3_sample_data-2019-09-26-04-44-35.tar.gz for installation.

 

After extracting used the Magento installer to install. 

The installation showed success. But I am not able to go to Admin page. It is showing 404 error.

404.png

 

Even the home page is not displayed properly:

home.png

 

 

 When I googled for solutions I could find the following advices:

 

1. Flush Cache

rm -rf var/cache/*
rm -rf var/generation/*
I did it but didn't help.
 
2. Enable rewrite
sudo a2enmod rewrite
No luck here
 
3. Modify apache2.conf
Already 'AllowOverride' was 'All' in '/var/www'
 
 .htaccess was already there in root, so added
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>
and restarted apache2.
 
No luck! still 404 in admin page
 
4. Checked the environment variable for 'frontName'. No problem there
 
5. Tried both 'localhost' and '127.0.0.1'. Still 404 error.
 
6. set global log_bin_trust_function_creators=1;  Still 404 error.
 
Finally, I checked the apache2 logs and the error there is:
[Thu Jan 23 11:49:05.255190 2020] [php7:error] [pid 9807] [client ::1:59960] script '/var/www/html/index.php' not found or unable to stat
I need help here. Why is the browser pointing to '/var/www/html/index.php', when the root folder is '/var/www/html/Magento'
 
 
 
 

 

5 REPLIES 5

Re: Admin Page gives 404 error after Magento 2.3.3 installation

Hi @umesh_rai ,

Make sure that you have ".htaccess" file in the pub/static folder.

and

  1. Open and edit the file /etc/apache2/apache2.conf
  2. Navigate to the place in the apache2.conf file <Directory /var/www/>
  3. Change "AllowOverride None" to "AllowOverride All"
  4. Save the file
  5. Restart apache2 -> sudo service apache2 restart

    I hope it will help you!

Re: Admin Page gives 404 error after Magento 2.3.3 installation

Already done in step 2 and 3 as listed above.

Re: Admin Page gives 404 error after Magento 2.3.3 installation

@umesh_rai  Issue seems to be with the htaccess only. You have not setup a separate domain (domainname.com) and server is pointing to localhost (html) folder which is is root folder.

 

However you are running website from Magento folder. I would say try to run the website from out side of Magento means move your code to html folder. Other work around is to play with

RewriteBase /
 

 

This should be /magento. Possibly needed on the root (html) folder. Or setup a separate domain to avoid this issues as you may want to setup more in future and separate domain for each project would be more nicer to have.

- Tarandeep
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.

Re: Admin Page gives 404 error after Magento 2.3.3 installation

Running website from /var/www/html/Magento folder. This folder has .htaccess file with default code.

Re: Admin Page gives 404 error after Magento 2.3.3 installation

I had a issue with 404 after i moved my files from a test folder to the root folder plus no css in front end 

I then reloaded the test folder files  and admin and front end are working ??