skip to Main Content

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?

2

Answers


  1. Chosen as BEST ANSWER

    I am posting this just for more details, as it will be helpfull in installation of shopware 6 (6.4) in ubuntu 22.04

    Here's a step-by-step guide on how to install Shopware 6 on Ubuntu 22.04:

    1. First, download the Shopware 6 ZIP file from the official website or GitHub repository.

    2. Unzip the downloaded file using the following command:

      unzip shopware.zip

    3. Once you have extracted the files, set the appropriate permissions for the Shopware root directory using the following command:

      sudo chown -R www-data: /var/www/shopware.test/public_html

    4. Next, create a new Apache virtual host configuration file using the following command:

      sudo nano /etc/apache2/sites-available/shopware.test.conf

    5. In the newly created file, add the following lines to configure the virtual host:

      <VirtualHost *:80>
         ServerName shopware.test
         DocumentRoot /var/www/shopware.test/public_html
         <Directory /var/www/shopware.test/public_html>
           AllowOverride All
           Require all granted
        </Directory>
       ErrorLog ${APACHE_LOG_DIR}/error.log
       CustomLog ${APACHE_LOG_DIR}/access.log combined
      </VirtualHost>
      
    6. Verify that the Apache configuration is correct using the following command:

      sudo apache2ctl configtest

    7. If there are no syntax errors in the configuration, reload the Apache service to apply the changes:

      sudo systemctl reload apache2

    8. Set the appropriate permissions once again to ensure that the Apache user has access to the Shopware root directory:

      sudo chown -R www-data: /var/www/shopware.test/public_html

    9. Enable the Apache rewrite module using the following command:

      sudo a2enmod rewrite

    10. Restart the Apache service to apply the changes:

    `sudo systemctl restart apache2`
    

    You should now be able to access your Shopware 6 installation by visiting the URL http://shopware.test in your web browser.


  2. 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>
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search