# Installation über shopware-installer.phar.php

**URL:** https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374
**Category:** Installation / Einstieg
**Created:** [30. September 2024 um 11:18 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374 "2024-09-30T11:18:52Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![r.bolleininger](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@r.bolleininger](https://forum.shopware.com/u/r.bolleininger)
#### Post date: [30. September 2024 um 11:18 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/1 "2024-09-30T11:18:52Z")

</div>

Hallo zusammen,

da ich aus unterschiedlichen Gründen shopware 6.6.6.1 schon mehrer Male neu aufgesetzt habe, hierzu eine Frage:

1. ich setzte im nginx das root auf /var/www/shop.meinedomain.de
2. ich lege eine leere Datenbank in der mariadb an: „shopdb“
3. ich erstelle eine Datenbankbenutzer der alle rechte auf die „shopdb“ hat
4. ich gebe im browser /shop.meinedomain.de/shopware-installer.phar.php ein
5. Die Istallation von shopware 6 startet
6. Die Dateien werden im Hintergrund auf den Server heruntergeladen
7. Die Installation bricht ab weil das Installationsprogramm /var/www/shop.meinedomain.de/public/install sucht und nicht findet
8. im Installtionsscreen stand ich solle root auf /var/www/shop.meinedomain.de/public ändern
9. Ich ändere das und starte nginx neu
10. Ich gebe /shop.meinedomain.de/ ein und die Installation läuft weiter, Datenbank wird installiert und und und

Meine Frage hierzu

Der erste Part der Installation sollte ja eigentlich sauber enden und nicht einfach „abbrechen“.  
Weshalb ist das nicht so?  
Mache ich irgendeinen Fehler?  
Sollte nicht der Aufruf /var/www/shop.meinedomain.de/public/install sauber funktionieren?  
Gruß, Ralf.

---

<div class="post-metadata">

### Author: ![Anotherone](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@Anotherone](https://forum.shopware.com/u/Anotherone)
#### Post date: [30. September 2024 um 16:16 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/2 "2024-09-30T16:16:14Z")

</div>

Also mir ist es schon zwei, drei Mal passiert, das ich das Ändern auf public mittendrin vergessen hab (find ich eh suboptimal gelöst) und ich konnte die Installation trotzdem problemlos beenden. Verwende allerdings meist den Apache, weiß nicht, ob das eine Rolle spielt (wüsste zwar nicht warum, aber wer weiß…).

---

<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: [30. September 2024 um 16:29 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/3 "2024-09-30T16:29:49Z")

</div>

Hi,

Deine nginx Config passt aber ? nginx unterstützt keine .htaccess Dateien so wie Apache - entsprechend musst Du passende Direktiven hinterlegen:

> **[Nginx | Shopware Documentation](https://developer.shopware.com/docs/v6.4/resources/references/config-reference/server/nginx.html)**
>
> Documentation for Shopware developers

Viele Grüße

---

<div class="post-metadata">

### Author: ![r.bolleininger](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@r.bolleininger](https://forum.shopware.com/u/r.bolleininger)
#### Post date: [30. September 2024 um 16:46 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/4 "2024-09-30T16:46:52Z")

</div>

@SCOOPEX, ich gehe davon aus, dass die nginx config passt. Ich habe mich an die Vorgaben, das Beispiel auf der Shopware „requirements“ Seite gehalten. Prinzipiell funktioniert ja alles, bis auf die beschriebenen Fehler.  
Außerdem würde ich dann nicht verstehen wie ein Fehler in der nginx config solchen Fehler in Shopware verursachen könnte.

---

<div class="post-metadata">

### Author: ![r.bolleininger](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@r.bolleininger](https://forum.shopware.com/u/r.bolleininger)
#### Post date: [30. September 2024 um 16:49 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/5 "2024-09-30T16:49:12Z")

</div>

@SCOOPEX

Ich kann auch die nginx config gerne mal hier posten.

---

<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: [30. September 2024 um 16:52 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/6 "2024-09-30T16:52:13Z")

</div>

Du hattest ja erwähnt, dass install nicht gefunden wird:

> [@r.bolleininger](#):
>
> Die Installation bricht ab weil das Installationsprogramm /var/www/shop.meinedomain.de/public/install sucht und nicht findet

Die shopware-installer.phar.php Datei lädt lediglich die aktuelle Shopware Version herunter. Für die Installation muss nach dem Download der Einstiegspunkt auf public gesetzt werden und für die Installation rufst Du dann halt Deine Domain auf.

In der vorgenannten nginx Config sind entsprechend Direktiven enthalten, damit install gefunden wird:

```auto
    # Shopware install / update
    location /recovery/install {
        index index.php;
        try_files $uri /recovery/install/index.php$is_args$args;
    }

    location /recovery/update/ {
        location /recovery/update/assets {
        }
        if (!-e $request_filename){
            rewrite . /recovery/update/index.php last;
        }
    }

```

Fehlt das bei Dir, wird das die Ursache sein … deshalb: besser nochmal die nginx Config prüfen (oder Apache verwenden - ist einfacher, da .htaccess unterstützt wird).

Viele Grüße

---

<div class="post-metadata">

### Author: ![r.bolleininger](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@r.bolleininger](https://forum.shopware.com/u/r.bolleininger)
#### Post date: [30. September 2024 um 17:01 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/7 "2024-09-30T17:01:11Z")

</div>

@SCOOPEX,

Das funktioniert ja soweit schon.

Nur beim ersten Teil der Installation ist ja der letzte Punkt auf der linken Seite „Abschluss“. Leider bricht der Vorgang vorher ab.  
Ich persönlich würde erwarten, dass dieser Punkt angezeigt wird und dann ein Hinweis angezeigt wird, der sagt: „ändere jetzt dein root auf …/public und rufe dann [shop.meinedomain.de](http://shop.meinedomain.de) auf.“  
Diese Anzeige gibt es bei mir aber nicht…

---

<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: [30. September 2024 um 17:04 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/8 "2024-09-30T17:04:45Z")

</div>

> [@r.bolleininger](#):
>
> „ändere jetzt dein root auf …/public und rufe dann [shop.meinedomain.de](http://shop.meinedomain.de) auf.“

wird evtl. schon aus dem install Teil generiert. Daher tippe ich wie gehabt auf die fehlenden Direktiven.

---

<div class="post-metadata">

### Author: ![r.bolleininger](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@r.bolleininger](https://forum.shopware.com/u/r.bolleininger)
#### Post date: [30. September 2024 um 18:28 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/9 "2024-09-30T18:28:30Z")

</div>

@SCOOPEX , danke dir werde das noch mal prüfen! Melde mich zurück.

---

<div class="post-metadata">

### Author: ![r.bolleininger](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@r.bolleininger](https://forum.shopware.com/u/r.bolleininger)
#### Post date: [30. September 2024 um 19:24 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/10 "2024-09-30T19:24:35Z")

</div>

Das ist meine nginx config Datei (ich habe meine url hier ersetzt) für shopware, wer Fehler findet, darf mir diese gerne nennen 😉

server {  
listen 80;  
server\_name [shop.meinedomain.de](http://shop.meinedomain.de);  
return 301 https://shop.meinedomain.de.de$request\_uri;  
}

server {  
listen 443 ssl;  
server\_name [shop.meinedomain.de](http://shop.meinedomain.de);  
server\_name\_in\_redirect off;  
ssl\_certificate /etc/letsencrypt/live/shop.meinedomain.de/fullchain.pem; # managed by Certbot  
ssl\_certificate\_key /etc/letsencrypt/live/shop.meinedomain.de/privkey.pem; # managed by Certbot  
client\_max\_body\_size 50M;  
open\_file\_cache max=3000 inactive=120s;  
open\_file\_cache\_valid 45s;  
open\_file\_cache\_min\_uses 2;  
open\_file\_cache\_errors off;  
#post\_max\_size = 100M;  
#upload\_max\_filesize = 100M;  
#max\_execution\_time = 30;  
#max\_execution\_time 30;  
access\_log /var/log/nginx/shop.meinedomain.de.access\_log;  
error\_log /var/log/nginx/shop.meinedomain.de.error\_log;  
root /var/www/html/shop.meinedomain.de/public;  
index index.php index.html index.htm index.html;  
# Support Clean (aka Search Engine Friendly) URLs  
location / {  
try\_files $uri $uri/ /index.php$args;  
}  
#location shopware recommendation 1  
location ~ ^/(recovery/update/index|index|shopware-installer.phar).php(/|$) {  
fastcgi\_split\_path\_info ^(.+.php)(/.+)$;  
include fastcgi.conf;  
fastcgi\_param HTTP\_PROXY „“;  
fastcgi\_buffers 8 16k;  
fastcgi\_buffer\_size 32k;  
proxy\_connect\_timeout 300s;  
proxy\_send\_timeout 300s;  
proxy\_read\_timeout 300s;  
send\_timeout 300s;  
client\_body\_buffer\_size 128k;  
#fastcgi\_pass unix:/run/php/php8.3-fpm.sock;  
fastcgi\_pass unix:/var/run/php/php8.3-fpm.sock;  
}  
#location shopware recommendation 2  
location ~\* ^.+.(?:css|cur|js|jpe?g|gif|ico|png|svg|webp|avif|html|woff|woff2|xml)$ {  
expires 1y;  
add\_header Cache-Control „public, must-revalidate, proxy-revalidate“;  
access\_log off;  
# The directive enables or disables messages in error\_log about files not found on disk.  
log\_not\_found off;  
tcp\_nodelay off;  
## Set the OS file cache.  
open\_file\_cache max=3000 inactive=120s;  
open\_file\_cache\_valid 45s;  
open\_file\_cache\_min\_uses 2;  
open\_file\_cache\_errors off;  
}  
# deny running scripts inside writable directories  
location ~\* /(images|cache|media|logs|tmp)/._.(php|pl|py|jsp|asp|sh|cgi)$ {  
return 403;  
error\_page 403 /403\_error.html;  
}  
location ~_ .php$ {  
fastcgi\_pass unix:/run/php/php8.3-fpm.sock;  
fastcgi\_index index.php;  
include fastcgi\_params;  
include /etc/nginx/fastcgi.conf;  
fastcgi\_param SCRIPT\_FILENAME $document\_root$fastcgi\_script\_name;  
}  
location ~ ^/(recovery/update/index|index|shopware-installer.phar).php(/|$) {  
fastcgi\_split\_path\_info ^(.+.php)(/.+)$;  
include fastcgi.conf;  
fastcgi\_param HTTP\_PROXY „“;  
fastcgi\_buffers 8 16k;  
fastcgi\_buffer\_size 32k;  
proxy\_connect\_timeout 300s;  
proxy\_send\_timeout 300s;  
proxy\_read\_timeout 300s;  
send\_timeout 300s;  
client\_body\_buffer\_size 128k;  
#fastcgi\_pass unix:/run/php/php8.3-fpm.sock;  
fastcgi\_pass unix:/var/run/php/php8.3-fpm.sock;  
}  
location ~\* ^.+.svg$ {  
add\_header Content-Security-Policy „script-src ‚none‘“;  
}  
#location shopware recommendation 5  
location ~\* ^.+.(?:css|cur|js|jpe?g|gif|ico|png|svg|webp|avif|html|woff|woff2|xml)$ {  
expires 1y;  
add\_header Cache-Control „public, must-revalidate, proxy-revalidate“;  
access\_log off;  
# The directive enables or disables messages in error\_log about files not found on disk.  
log\_not\_found off;  
tcp\_nodelay off;  
## Set the OS file cache.  
open\_file\_cache max=3000 inactive=120s;  
open\_file\_cache\_valid 45s;  
open\_file\_cache\_min\_uses 2;  
open\_file\_cache\_errors off;  
}  
#location shopware recommendation 6  
#location / {  
#try\_files $uri /index.php$is\_args$args;  
#}  
# Enable Shopware 6.x installer  
location /shopware-installer.phar.php {  
try\_files $uri /shopware-installer.phar.php$is\_args$args;  
}  
# Run static files generated by shopware-installer.phar.php through PHP  
location ~ ^/shopware-installer.phar.php/.+.(?:css|js|png|svg|woff)$ {  
try\_files $uri /shopware-installer.phar.php$is\_args$args;  
}  
#Enable Shopware 6.x installer  
location /recovery/install {  
index index.php;  
try\_files $uri /recovery/install/index.php$is\_args$args;  
}  
#Enable Shopware 6.x update  
location /recovery/update/ {  
location /recovery/update/assets {  
}  
if (!-e $request\_filename){  
rewrite . /recovery/update/index.php last;  
}  
}  
location ~ ^/(status|ping)$ {  
access\_log off;  
#allow 127.0.0.1;  
#allow 1.2.3.4#your-ip;  
#deny all;  
include fastcgi\_params;  
#fastcgi\_pass unix:/run/php/php8.3-fpm.sock;  
fastcgi\_pass unix:/var/run/php/php8.3-fpm.sock;  
}  
# caching of files  
location ~\* .(ico|pdf|flv)$ {  
expires 1y;  
}  
location ~\* .(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ {  
expires 14d;  
}  
location ~\* ^.+.svg$ {  
add\_header Content-Security-Policy „script-src ‚none‘“;  
}  
}

---

<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: [1. Oktober 2024 um 07:58 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/11 "2024-10-01T07:58:23Z")

</div>

Die Config sieht nach einem ziemlichen Durcheinander aus. Beachte, dass die Direktiven der Reihe nach verarbeitet werden - findet nginx also einen „Treffer“, der passen könnte, werden später folgende Direktiven ignoriert.

Als erstes würde ich die Direktiven für install/update so wie in der Doku beschrieben nach oben setzen und

```auto
root __DOCUMENT_ROOT__ /public;

```

fehlt komplett.

> [@r.bolleininger](#):
>
> #Enable Shopware 6.x installer  
> location /recovery/install {  
> index index.php;  
> try\_files $uri /recovery/install/index.php$is\_args$args;  
> }  
> #Enable Shopware 6.x update  
> location /recovery/update/ {  
> location /recovery/update/assets {  
> }  
> if (!-e $request\_filename){  
> rewrite . /recovery/update/index.php last;  
> }  
> }

Und auch nochmal der Hinweis, evtl. Apache zu verwenden anstelle von nginx.

nginx ist deutlich komplexer mit den Direktiven als Apache mit .htaccess. Auch ist nginx nicht zwingend „schneller“ als Apache (allenfalls bei vielen hundert gleichzeitigen Anfragen, da nginx weniger Arbeitsspeicher benötigt).

---

<div class="post-metadata">

### Author: ![r.bolleininger](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@r.bolleininger](https://forum.shopware.com/u/r.bolleininger)
#### Post date: [1. Oktober 2024 um 08:21 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/12 "2024-10-01T08:21:18Z")

</div>

Hi @SCOOPEX ,

root fehlt nicht, dort steht doch:  
root /var/www/html/shop.meinedomain.de/public;

---

<div class="post-metadata">

### Author: ![r.bolleininger](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@r.bolleininger](https://forum.shopware.com/u/r.bolleininger)
#### Post date: [1. Oktober 2024 um 08:26 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/13 "2024-10-01T08:26:49Z")

</div>

@SCOOPEX ,

Das Problem ist behoben, hier war der Fehler:

location / {

#try\_files $uri $uri/ /index.php$args;  
try\_files $uri $uri/ $uri/index.php$is\_args$args /index.php$is\_args$args;  
}

Die auskommentierte Zeile war die aus den Shopware Empfehlungen, diese habe ich durch die Zeile darunter ersetzt. Jetzt funktioniert alles…

---

<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: [1. Oktober 2024 um 08:27 UTC](https://forum.shopware.com/t/installation-ueber-shopware-installer-phar-php/105374/14 "2024-10-01T08:27:53Z")

</div>

Prima - nginx ist mit den Direktiven halt leider sehr „penibel“ …
