# Anleitung - Installation Ubuntu 20.04 VPS - Shopware 6 - Apache2

**URL:** <https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279>\
**Category:** Installation / Einstieg\
**Created:** [6. März 2022 um 19:28 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279 "2022-03-06T19:28:47Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![sven-sw](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sven-sw](https://forum.shopware.com/u/sven-sw)\
**Post date:** [6. März 2022 um 19:28 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/1 "2022-03-06T19:28:47Z")

</div>

Hallo Forum,

nach welcher Anleitung sollte ich 2022 Shopware 6 auf einem VPS Server installieren?  
Mein Apache2 Server ist erreichbar.

Das System:

> Shopware 6 - requirements
> 
> ### 
> 
> https : / /docs.shopware.com/en/shopware-6-en/first-steps/system-requirements
> 
> ### 
> 
> ### 
> 
> My system
> 
> ### 
> 
> cat /etc/lsb-release  
> DISTRIB\_ID=Ubuntu  
> DISTRIB\_RELEASE=20.04  
> DISTRIB\_CODENAME=focal  
> DISTRIB\_DESCRIPTION=„ **Ubuntu 20.04.4 LTS** “
> 
> ### 
> 
> sudo apache2 -v  
> Server version: **Apache/2.4.41** (Ubuntu)
> 
> ### 
> 
> sudo php -v  
> **PHP 8.0.16** (cli) (built: Feb 21 2022 14:42:00) ( NTS )  
> Copyright (c) The PHP Group  
> Zend Engine v4.0.16, Copyright (c) Zend Technologies  
> with Zend OPcache v8.0.16, Copyright (c), by Zend Technologies
> 
> ### 
> 
> sudo mariadb -v  
> Welcome to the MariaDB monitor. Commands end with ; or \g.  
> Your MariaDB connection id is 31  
> Server version: 10.7.3- **MariaDB-1:10.7.3** +maria~focal [mariadb.org](http://mariadb.org) binary distribution  
> Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
> 
> ###

> **[VPS Tutorial: Shopware auf vServer installieren - dogado.de](https://www.dogado.de/vps/vserver-anwendungsfaelle/shopware-auf-vserver-installieren)**
>
> VPS: Shopware auf vServer installieren - So geht es! ✓ Informier…

Die zuvor verlinkte Anleitung funktioniert nicht.

VG  
sven-sw

---

<div class="post-metadata">

**Author:** ![sven-sw](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sven-sw](https://forum.shopware.com/u/sven-sw)\
**Post date:** [6. März 2022 um 21:16 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/2 "2022-03-06T21:16:48Z")

</div>

![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/b/5/b551398a3d05dd2655b0195b7a59fea745637d8e.jpeg)

Wie genau muss die

```auto
nano /etc/apache2/sites-available/000-default.conf

```

aussehen?

> **[Shopware 6 - Setting Up a Local Environment with Virtual Box](https://docs.shopware.com/en/shopware-6-en/tutorials-and-faq/virtual-box-setup)**
>
> This article will show you how to set up a virtual machine for a local shopware 6 environment in development mode. This is especially important for windows users, since you need a valid unix environment for the setup.

---

<div class="post-metadata">

**Author:** ![SCOOPEX](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/scoopex/32/18328_2.png) [@SCOOPEX](https://forum.shopware.com/u/SCOOPEX)\
**Post date:** [6. März 2022 um 22:33 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/3 "2022-03-06T22:33:32Z")

</div>

Hi,

ganz ehrlich ? Wenn Du davon keine Ahnung hast solltest Du keinen eigenen Server betreiben und Dir Managed Services suchen. Andernfalls kann das übel enden. Stichwort DSGVO.

Viele Grüße

---

<div class="post-metadata">

**Author:** ![sven-sw](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sven-sw](https://forum.shopware.com/u/sven-sw)\
**Post date:** [7. März 2022 um 05:37 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/4 "2022-03-07T05:37:56Z")

</div>

Hallo Forum.

die Antwort von @SCOOPEX hat der Problemlösung nichts beigetragen.

Jetzt gibt es mit einem Internetbrowseraufruf folgenden Hinweis:

**Fatal error** : Uncaught LogicException: Extension DOM is required. in /var/www/html/vendor/symfony/config/Util/XmlUtils.php:50 Stack trace: #0 /var/www/html/vendor/symfony/config/Util/XmlUtils.php(146): Symfony\Component\Config\Util\XmlUtils::parse() #1 /var/www/html/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php(405): Symfony\Component\Config\Util\XmlUtils::loadFile() #2 /var/www/html/vendor/symfony/dependency-injection/Loader/XmlFileLoader.php(50): Symfony\Component\DependencyInjection\Loader\XmlFileLoader-\>parseFileToDOM() #3 /var/www/html/vendor/shopware/core/Framework/Framework.php(59): Symfony\Component\DependencyInjection\Loader\XmlFileLoader-\>load() #4 /var/www/html/vendor/symfony/http-kernel/Kernel.php(678): Shopware\Core\Framework\Framework-\>build() #5 /var/www/html/vendor/symfony/http-kernel/Kernel.php(649): Symfony\Component\HttpKernel\Kernel-\>prepareContainer() #6 /var/www/html/vendor/symfony/http-kernel/Kernel.php(547): Symfony\Component\HttpKernel\Kernel-\>buildContainer() #7 /var/www/html/vendor/shopware/core/Kernel.php(194): Symfony\Component\HttpKernel\Kernel-\>initializeContainer() #8 /var/www/html/vendor/shopware/recovery/Install/src/app.php(45): Shopware\Core\Kernel-\>boot() #9 /var/www/html/vendor/shopware/recovery/Install/index.php(74): getApplication() #10 /var/www/html/public/recovery/install/index.php(6): require\_once(‚…‘) #11 {main} thrown in **/var/www/html/vendor/symfony/config/Util/XmlUtils.php** on line **50**

Ist **PHP 8.0.16** und **MariaDB-1:10.7.3** mit **Shopware 6.4.8.1** compatibel?

Meine /etc/apache2/sites-available/000-default.conf

```auto
<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

```

Wo finde ich eine funktionierende Anleitung, wie löse ich das Problem?

VG  
sven-sw

Aus 2019

> [@Shopware Root Directory -\> You should not be able to see this page](https://forum.shopware.com/t/shopware-root-directory-you-should-not-be-able-to-see-this-page/61715/8):
>
> Vhost Config habe ich schon nachgesehen. Der Pfad zum DocumentRoot ist der, der er sein soll. Nirgendwo gibt es eine Konfiguration, dass auf /public\_html eine Domain routen würde oder /public\_html der DocumentRoot wäre. Das /public\_html Verzeichnis ist deswegen über www nicht erreichbar, eben weil der DocumentRoot für die TLD Domain auf /public\_html/hauptdomain routet. Das Einzige, was ich mir als Ursache vorstellen kann, ist dass der Shopware Installer nicht den Pfad vom DocumentRoot ausliest, …

@serpent_driver  
Hast Du konkreter Lösungsansätze für mich?  
Nach welcher Anleitung sollte ich vorgehen?

---

<div class="post-metadata">

**Author:** ![SCOOPEX](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/scoopex/32/18328_2.png) [@SCOOPEX](https://forum.shopware.com/u/SCOOPEX)\
**Post date:** [7. März 2022 um 08:12 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/5 "2022-03-07T08:12:46Z")

</div>

Hallo,

siehe Fehlermeldung: **Fatal error** : Uncaught LogicException: **Extension DOM is required**

Dir fehlt die PHP DOM Extension:  
[PHP: Einführung - Manual](https://www.php.net/manual/de/intro.dom.php)

Viele Grüße

---

<div class="post-metadata">

**Author:** ![sven-sw](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sven-sw](https://forum.shopware.com/u/sven-sw)\
**Post date:** [7. März 2022 um 08:16 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/6 "2022-03-07T08:16:43Z")

</div>

```auto
sudo apt show php8.0-xml
Package: php8.0-xml
Version: 8.0.16-1+ubuntu20.04.1+deb.sury.org+1
Priority: optional
Section: php
Source: php8.0

```

Installation:

```auto
sudo apt install php8.0-xml
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  php8.0-xml
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 91.1 kB of archives.
After this operation, 407 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main arm64 php8.0-xml arm64 8.0.16-1+ubuntu20.04.1+deb.sury.org+1 [91.1 kB]
Fetched 91.1 kB in 0s (4727 kB/s)  
Selecting previously unselected package php8.0-xml.
(Reading database ... 113817 files and directories currently installed.)
Preparing to unpack .../php8.0-xml_8.0.16-1+ubuntu20.04.1+deb.sury.org+1_arm64.deb ...
Unpacking php8.0-xml (8.0.16-1+ubuntu20.04.1+deb.sury.org+1) ...
Setting up php8.0-xml (8.0.16-1+ubuntu20.04.1+deb.sury.org+1) ...

```

/etc/apache2/sites-available/000-default.conf

```auto
cat /etc/apache2/sites-available/000-default.conf
<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName www.example.com

        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html

        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noe

```

---

<div class="post-metadata">

**Author:** ![SCOOPEX](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/scoopex/32/18328_2.png) [@SCOOPEX](https://forum.shopware.com/u/SCOOPEX)\
**Post date:** [7. März 2022 um 08:29 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/7 "2022-03-07T08:29:27Z")

</div>

Das Modul ist vermutlich noch nicht für Apache aktiviert, sondern nur für die Shell (CLI)

Siehe

> **[How to Enable or Disable PHP Modules on Ubuntu 20.04 | 18.04](https://brightwhiz.com/enable-disable-php-modules-ubuntu/)**
>
> This guide we will be showing how you can enable or disable PHP modules on Ubuntu 20.04 LTS as well as other versions

---

<div class="post-metadata">

**Author:** ![sven-sw](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sven-sw](https://forum.shopware.com/u/sven-sw)\
**Post date:** [15. März 2022 um 17:00 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/8 "2022-03-15T17:00:20Z")

</div>

Nochmals von vor, Versuch einer sauberen Installation

**Ubuntu 20.04, Apache2, PHP8.0, MariaDB 10.7, Shopware 6.4.8.1**

Die verwendeten Anleitungen:

> **[How to Install Apache on Ubuntu 20.04](https://linuxize.com/post/how-to-install-apache-on-ubuntu-20-04/)**
>
> This tutorial describes how to install and manage the Apache web server on Ubuntu 20.04. Apache is one of the most popular web servers in the world.

> **[How to Install PHP 8 on Ubuntu 20.04](https://linuxize.com/post/how-to-install-php-8-on-ubuntu-20-04/)**
>
> This article will show you how to install PHP 8 on Ubuntu 20.04 and integrate it with Nginx and Apache.

> **[How to Install MariaDB 10.7 on Ubuntu 20.04 - LinuxCapable](https://www.linuxcapable.com/how-to-install-mariadb-10-7-on-ubuntu-20-04/)**
>
> MariaDB is one of the most popular open-source databases next to its originator MySQL. The original creators of MySQL developed MariaDB in response to fears that MySQL would suddenly become a paid service ......

---

<div class="post-metadata">

**Author:** ![sven-sw](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sven-sw](https://forum.shopware.com/u/sven-sw)\
**Post date:** [15. März 2022 um 17:17 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/9 "2022-03-15T17:17:44Z")

</div>

**Apache2 Server**

http:// IP-Adresse

Die Apache2 Testseite ist aufrufbar.

Hinweis: The default Ubuntu document root is /var/www/html  
Das muss für Shopware 6.4.8.1 später auf /var/www/html/public angepasst werden.

---

<div class="post-metadata">

**Author:** ![sven-sw](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sven-sw](https://forum.shopware.com/u/sven-sw)\
**Post date:** [15. März 2022 um 17:22 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/10 "2022-03-15T17:22:51Z")

</div>

**PHP 8.0**

```auto
sudo apt install php8.0 php8.0-common php8.0-mysql php8.0-xml php8.0-xmlrpc php8.0-curl php8.0-gd php8.0-imagick php8.0-cli php8.0-dev php8.0-imap php8.0-mbstring php8.0-opcache php8.0-soap php8.0-zip php8.0-redis php8.0-intl

```

```auto
sudo update-alternatives --config php
There are 2 choices for the alternative php (providing /usr/bin/php).

  Selection Path Priority Status
------------------------------------------------------------
  0 /usr/bin/php8.1 81 auto mode
* 1 /usr/bin/php8.0 80 manual mode
  2 /usr/bin/php8.1 81 manual mode

Press <enter> to keep the current choice[*], or type selection number: 

```

```auto
sudo a2enmod php8.0
Considering dependency mpm_prefork for php8.0:
Considering conflict mpm_event for mpm_prefork:
Considering conflict mpm_worker for mpm_prefork:
Module mpm_prefork already enabled
Considering conflict php5 for php8.0:
Module php8.0 already enabled

```

```auto
# PHP 8.0
sudo update-alternatives --set php /usr/bin/php8.0
sudo update-alternatives --set phar /usr/bin/phar8.0
sudo update-alternatives --set phar.phar /usr/bin/phar.phar8.0

```

Abschlusscheck

```auto
php -v
PHP 8.0.16 (cli) (built: Feb 21 2022 14:42:00) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.16, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.16, Copyright (c), by Zend Technologies

```

---

<div class="post-metadata">

**Author:** ![sven-sw](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sven-sw](https://forum.shopware.com/u/sven-sw)\
**Post date:** [15. März 2022 um 17:23 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/11 "2022-03-15T17:23:40Z")

</div>

**MariaDB 10.7**

Vorarbeit gemäß Anleitung dann

```auto
sudo apt install mariadb-server mariadb-client

```

```auto
sudo mariadb -v
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 32
Server version: 10.7.3-MariaDB-1:10.7.3+maria~focal mariadb.org binary distribution

```

---

<div class="post-metadata">

**Author:** ![sven-sw](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sven-sw](https://forum.shopware.com/u/sven-sw)\
**Post date:** [15. März 2022 um 17:41 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/12 "2022-03-15T17:41:04Z")

</div>

**Shopware 6.4.8.1**

https:// [docs.shopware.com/de/shopware-6-de/tutorials-and-faq/virtual-box-setup](http://docs.shopware.com/de/shopware-6-de/tutorials-and-faq/virtual-box-setup)

hier soll mehr kommen

Edit 16.03.2022: wobei ich heute wieder unsicher bin ob ich nicht auf Shopware 6.4.9 setzen sollte. Für alte Versionen interessiert sich gewöhnlich niemand.

---

<div class="post-metadata">

**Author:** ![sven-sw](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sven-sw](https://forum.shopware.com/u/sven-sw)\
**Post date:** [16. März 2022 um 06:03 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/13 "2022-03-16T06:03:13Z")

</div>

Welchen Bedingung muss ein Ubuntu 20.04 erfüllen um Shopware 6.4.9.0 installieren zu können?

D. h. bevor ich irgendwie Berührung mit Shopware 6 hatte.  
Eine default Apache Server für verschiedene Web-PHP Anwendungen.

So wie es mit z. B. 1blu Shared Hosting (nicht zu empfehlen, da funktiniert nichts) den ich anmieten kann.

> **[So installieren Sie PHP-FPM mit Apache unter Ubuntu 20.04 - Gamingsym Germany](https://gamingsym.in/gr/so-installieren-sie-php-fpm-mit-apache-unter-ubuntu-20-04/)**
>
> So installieren Sie PHP-FPM mit Apache unter Ubuntu 20.04. Es gibt zwei verschiedene Optionen, um PHP über den Webserver auszuführen. Einer verwendet das CGI von \[...\]

Wäre dieser abgestimmte Server ein gute Basis?

MfG  
sven-sw

Ergebnis:  
Die Anleitung funktioniert einwanfrei mit meine Subdomain, Schritt 7 habe ich nicht durchgeführt. weil ich noch unsicher bin bezüglich des Shopware 6 Realeases.

---

<div class="post-metadata">

**Author:** ![sven-sw](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@sven-sw](https://forum.shopware.com/u/sven-sw)\
**Post date:** [16. März 2022 um 07:37 UTC](https://forum.shopware.com/t/anleitung-installation-ubuntu-20-04-vps-shopware-6-apache2/93279/14 "2022-03-16T07:37:13Z")

</div>

MariaDB 10.7 wurde von mir installiert (Anleitung LinuxCapable – 17 Nov 21)

```auto
sudo mariadb -v
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 31
Server version: 10.7.3-MariaDB-1:10.7.3+maria~focal mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

```
