cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to access Magento admin page

SOLVED

Re: Unable to access Magento admin page

Hi @fabio_marano

 

You need to change the DocumentRoot setting in your httpd.conf file of Apache.

 

Chances are it will be under something like /etc/apache2/conf/httpd.conf

 

Use your favourite editor (I recommend Vim) and look for the DocumentRoot and change it

to /magento2.

 

Also look a little further down for a setting that looks like this:

<Directory "/var/www">
You will also want to change what is in the quotes to your new directory.

 

This gives Apache access to read from that directory when a user makes a request that call on it.

 

Now restart your apache service (httpd -k restart) and you should be good to go.

 

Edit: Apache2 site config files are now typically kept in /etc/apache2/sites-available/ (Debian, Ubuntu, etc.).

 

if issue solved,Click Kudos & Accept as Solution

Re: Unable to access Magento admin page

Sorry it was my mistake because pointed to a public dns ( http://www.example.com ).

But if you could give some hints on apache vhost configuration because every URI point to / when the correct is /Mengento/

Re: Unable to access Magento admin page

Hi @fabio_marano

 

I have updated my answer please check above answer  !!

if issue solved,Click Kudos & Accept as Solution

Re: Unable to access Magento admin page

This is my configuration that doesn't work for URI point to / but only for /Magento

 

<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog /var/www/logs/error.log
CustomLog /var/www/logs/access.log combined
<Directory /var/www/html/Magento>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>

</VirtualHost>

Re: Unable to access Magento admin page

Hi @fabio_marano

 

Try below configuration : 

 

<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/Magento
ErrorLog /var/www/logs/error.log
CustomLog /var/www/logs/access.log combined
<Directory /var/www/html/Magento>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>

</VirtualHost>

 

Note : After doing this changes please restart your apache server

if issue solved,Click Kudos & Accept as Solution

Re: Unable to access Magento admin page

now I see the pages  correctly but the link of admin : http://localhost/Magento/admin_1nfkvs/

is not found!

 

Re: Unable to access Magento admin page

Hi

can you please confirm that .htaccess file is there or not in root directory of magento 2 ?

seems like again you have same issue
if issue solved,Click Kudos & Accept as Solution

Re: Unable to access Magento admin page

yes it is there in the root of magento

Re: Unable to access Magento admin page

ok resolved after

php magento cache:clean
php magento cache:flush

the link now responds at : http://localhost/admin_1nfkvs