Magento 2 – Fix 404 Page When Navigating from Admin to Web Setup Wizard

404-pagemagento2web-setup-wizard

Magento 2.0.2 installed from composer, when I try to navigate to Web Setup Wizard:
http://mg2.com/admin_url/admin/backendapp/redirect/app/setup/
It takes me to http://mg2.com/setup which in turn produces 404 page
Magento is setup to use /pub as document root, with apache mod_php
Any ideas why is it not working?

Update:

Since Magento was configured with pub as site root, I decided that this might cause the issue, so I changed apache config to serve from Magento root.
Did not make any difference, still http://mg2.com/setup produces 404

Best Answer

So when you have the case of Magento being served out of pub one solution to have access to setup is to configure an alias. To do that in apache, you may do something like the following.

<VirtualHost *:80>
    ServerName m2.local
    ServerAdmin jamby77@gmail.com
    DocumentRoot "/var/www/magento202/pub"

    <Directory "/var/www/magento202/pub">
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
    Alias "/setup" "/var/www/magento202/setup"
    Alias "/update" "/var/www/magento202/update"
</VirtualHost>

Probably not the most elegant solution but it works.

Related Topic