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,
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
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:
First, download the Shopware 6 ZIP file from the official website or GitHub repository.
Unzip the downloaded file using the following command:
unzip shopware.zip
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
Next, create a new Apache virtual host configuration file using the following command:
sudo nano /etc/apache2/sites-available/shopware.test.conf
In the newly created file, add the following lines to configure the virtual host:
Verify that the Apache configuration is correct using the following command:
sudo apache2ctl configtest
If there are no syntax errors in the configuration, reload the Apache service to apply the changes:
sudo systemctl reload apache2
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
Enable the Apache rewrite module using the following command:
sudo a2enmod rewrite
Restart the Apache service to apply the changes:
You should now be able to access your Shopware 6 installation by visiting the URL http://shopware.test in your web browser.
The problem is that your document root is not pointing to the
public
folder, hence why you currently have to navigate toshopware/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.