Select Page

The requested URL was not found on this server Magento2

Ashish Singh
Published: August 5, 2022

In this blog I will guide you how to resolve “The requested URL was not found” issue.

Today I face an issue in my Ubuntu 18.0.4 environment when I was trying to install Magento2 by following all the steps mentioned inside the Magento2 installation Guide.

After following all the steps Magento2 has been successfully installed on my environment.

screenshot-192.168.1.120_70-2020.06.01-21_52_04

But when I tried to open admin URL for Magento2 then I face “The requested URL was not found on this server” but there is no issue with the store URL.

screenshot-192.168.1.120_70-2020.06.01-22_29_20

Then a bit searching, I found few solutions and I tried all the solutions one by one.

So here I am sharing all the solutions one by one.

Solution 1

You can try to access your Magento admin using “domain.com/index.php/admin” instead of “domain.com/admin“. In order to resolve “”The requested URL was not found on this server“”

Solution 2

If solution 1 will not work for you then you can enable rewrite on web server.

For Apache web server users

Open the Apache virtual host file which is present inside the “/etc/apache2/sites-enabled/000-default.conf” or “/etc/apache2/acache2.conf” then replace the below line from,

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

To (replace the “AllowOverride None” line with “AllowOverride All“)

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

It will enable “mod_rewrite” for apache web server but if you are a Ubuntu user then you can use below command,

a2enmod rewrite

Then after following above steps you can restart your Apache web server.

service apache2 restart
or
/etc/init.d/apache2 restart

For Nginx web server users

Open the config file of your Nginx web server. You can find your file inside the “/etc/nginx/sites-enabled/yourdomain

server {
…
       index index.php;
       if ($request_uri ~* "^(.*/)index.php$") {
            return 301 $1;
       }
…
}

After making these changes your needs to restart your Nginx web server.

service nginx restart
or
/etc/init.d/nginx restart

Solution 3

If solutions 1 & 2 will not work for you and you are Apache web server user then you can try this solution as well.

Check your “.htaccess” file inside the Magento root directory. If that file is not present then you can create that file with the required definition or you can replace the “.htaccess.sample” with the “.htaccess“.

Or if that file is present then you can check these lines are correct or not inside the “.htaccess” file

IqL1lrH8SE24STSuR33miA

This is how you fix this issue and you will be able to successfully login your Magento.

You can also check some other informative blogs

We Would Love to Hear From You!

Hope you find the blog informative! Please feel free to share your feedback in the comments below.

If you still have any issues/queries then please raise a ticket at https://webkul.uvdesk.com/en/customer/create-ticket/

For any doubt contact us at [email protected].

Thanks for paying attention!!

🙂 😊

Source: webkul.com