1

I know there are many answers for this i tried all and not able to do it on my server hosted with godaddy magento latest version

I tried this

<Directory /var/www/>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
</Directory>

404 not found error for admin page

didn't work out

then

php bin/magento setup:upgrade

php bin/magento setup:static-content:deploy

rm -rf var/cache/*

rm -rf var/generation/*

this dint work out

added httaccess to my root directory

https://github.com/emizentech/magento2/blob/master/.htaccess.sample

though it was not there still dint work out home page works fine as expected with no erros on it

but admin page says 404 error

domain.com/admin

Not Found
The requested URL /admin was not found on this server.

Apache/2.4.18 (Ubuntu) Server at 192.169.143.135 Port 80

If I added domain.com/index.php/admin

Not Found
The requested URL /admin/admin/index/index/key/be1e5947f83b71x354749eds3ba0aa7321a8a8d659aca49cc8a00fb4de1cc57ab956f/ was not found on this server.

Apache/2.4.18 (Ubuntu) Server at 192.169.143.135 Port 80

I enabled developer mode to

 main.DEBUG: cache_invalidate:  {"method":"GET","url":"http://192.169.143.135/index.php/admin/","invalidateInfo":{"tags":["interception","CONFIG"],"mode":"matchingTag"}} []

enter image description here

  • have you checked your admin front name in env.php – kunj Jun 3 '18 at 4:00
  • 'backend' => [ 'frontName' => 'admin' ], it is same – Shaik Jun 3 '18 at 8:07
  • do you have multistore? – kunj Jun 3 '18 at 8:10
  • no it is just a single store site newly installed on this server – Shaik Jun 3 '18 at 8:13
  • 1
    @kunj magento.stackexchange.com/questions/89634/… fineally this solved my problem – Shaik Jun 3 '18 at 17:22
2

Fileally After Rebuilding Server again

installing php 7.1 mysql marine

apache2

got the solution

Source : After successful installation, admin URL is returning a 404?

I was also facing the same problem. My frontend's css is not loading as well as admin panel was giving 404 error page. The solution of both the problem in ubuntu is enable Apache server rewrites:

  1. Go to your terminal and run this command:

    sudo gedit /etc/apache2/apache2.conf

    And change:

    <Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride none
    Require all granted
    

    To

    <Directory /var/www/>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
    

    change only AllowOverride none to All

  2. Go to your terminal and run command:

    sudo a2enmod rewrite

    sudo service apache2 restart

  3. Then give the permission to your var, pub and app/etc. and then go to your admin and frontend it works properly.

2

Please try Below steps

  • Delete var/cache folder
  • Go to database SELECT * FROM core_config_data WHERE path = 'web/seo/use_rewrites' and make it 0
  • Then enter url in your browser magento_base_url/index.php/your_admin_url

try and let me know if you face any issue.

  • i did check the updated image no effects – Shaik Jun 3 '18 at 8:14
  • Can you check url rewrites enable or disable. if enable than you can disable after cache flush and check. – user68116 Jun 3 '18 at 11:39
1

Change Admin Path and try again:

It is not recommended to change it directly from app/etc/env.php, always prefer the CLI:

php bin/magento setup:config:set --backend-frontname="admin_url"
  • php bin/magento setup:config:set --backend-frontname="admin" tried no effect – Shaik Jun 3 '18 at 8:05
0

In my case, I had accidentally set a store as the default in the control panel:

enter image description here

In core_config_data:

layout_switcher/general/default_theme was set to 'interiors'

Whenever I tried to access the admin area, I got the template for interiors and a 404. To fix I set:

layout_switcher/general/default_theme back to 'base'

I then ran:

php bin/magento cache:clean
php bin/magento cache:flush

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.