Search code examples
ubuntushopwareshopware6

After installation of shopware 6 it's showing "not found" and "url not found on this server" error all over the page


I am trying to install shopware 6 on ubuntu os and on LOCALHOST, and after installation it was showing this errors all over the page, enter image description here

I have installed shopware using below command:

composer create-project shopware/production:6.3 shopware

bin/console system:setup

bin/console system:install --create-database --basic-setup

this is my .htaccess DirectoryIndex index.html index.php

<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

<IfModule mod_alias.c>
    # Restrict access to VCS directories
    RedirectMatch 404 /\\.(svn|git|hg|bzr|cvs)(/|$)

    # Restrict access to root folder files
    RedirectMatch 404 /(composer\.(json|lock|phar)|README\.md|\.gitignore|.*\.dist|\.env.*)$
</IfModule>

I am newbie in both ubuntu and shopware development, I am trying this for days but finally when i done with installation i reach to this wall and could not know what to do?

can anyone help on this?


Solution

  • The problem is that your document root is not pointing to the public folder, hence why you currently have to navigate to shopware/public which is not intended to be the case.

    You may want to create a virtual host file to set the document root to the public directory.

    <VirtualHost *:80>
      DocumentRoot /var/www/html/shopware/public
      <Directory /var/www/html/shopware/public>
          AllowOverride all
          Require all granted
      </Directory>
    </VirtualHost>