New in CWP Edge-LatestFree with every CWPpro licenceWebsites up to 300x faster

CWP now includes LSPHP, LSAPI-Cache and CWP Cage at no extra cost with all CWPpro licences. The LSAPI-Cache plugin is integrated into our WordPress and other script installers, and CWP Cage gives every user complete isolation. Available now in the CWP Edge-Latest version.

Get CWPpro ›

magento and apache document root issue

Started by tonysar, December 11, 2017, 09:05:32 PM

Previous topic - Next topic

tonysar

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.

SimeonF

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.

tonysar

Thank you for pointing this out.
will look into that configuration section to see what is what .  :'(