Author Topic: magento and apache document root issue  (Read 6643 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
magento and apache document root issue
« on: December 11, 2017, 09:05:32 PM »
Hello.
vps running centos linux , with centos web panel.
Moved my Magento 2 site from shared hosting to vps .. everything seems to be working except Web setup wizard in admin.
after countless search and reading about the issue , suggestion is that , magento is being served from /pub folder , and setup wizard wont work because this is the intended behaviour. solution is to point apache document root to root installation of magento.
looking at apache config file .. is see this

DocumentRoot "/usr/local/apache/htdocs"
<Directory "/usr/local/apache/htdocs">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    Require all granted
</Directory>

as it states , DocumentRoot: The directory out of which you will serve your
 documents. By default, all requests are taken from this directory.

however, all my documents are located in /home/USERNAME/public_html/
so this is a bit confusing ..
Magento installed in public_html as a root installation . so question is , how can i change document root from /pub to / from within apache config?
Thanks.

Offline
*
Re: magento and apache document root issue
« Reply #1 on: December 12, 2017, 02:18:36 PM »
look into /usr/local/apache/conf.d/vhosts.conf (or vhosts-ssl.conf if you use SSL).

The Part you posted is only the fallback if someone reaches your server via an unconfigured domain/ip.

Offline
*
Re: magento and apache document root issue
« Reply #2 on: December 12, 2017, 02:31:38 PM »
Thank you for pointing this out.
will look into that configuration section to see what is what .  :'(