# Installation unter Nginx und ISPConfig

**URL:** <https://forum.shopware.com/t/installation-unter-nginx-und-ispconfig/62494>\
**Category:** Installation / Einstieg\
**Created:** [19. Oktober 2019 um 07:15 UTC](https://forum.shopware.com/t/installation-unter-nginx-und-ispconfig/62494 "2019-10-19T07:15:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ciatronical](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@Ciatronical](https://forum.shopware.com/u/Ciatronical)\
**Post date:** [19. Oktober 2019 um 07:15 UTC](https://forum.shopware.com/t/installation-unter-nginx-und-ispconfig/62494/1 "2019-10-19T07:15:49Z")

</div>

Hey All,

ich versuche schon einige Zeit Shopware 6 mit Nginx und ISPConfig zum laufen zu bringen.  
Die Datenbankinstallation klappt doch nach dem Anlegen des Shopadmins bricht die Installation mit dem Fehlercode 500 ab.  
Selbiger Fehler erscheint wenn ich die Admin-Seite aufrufe. In Frontend erschein eine verstümmelte Startseite die so aus sieht als fehlte das CSS.

Im Error-Log steht lediglich:

```
 *1761 rewrite or internal redirection cycle while internally redirecting to "/error/404.html", client: 185.6.8.9, server: pro-tune.de, request: "GET /account/order HTTP/1.1", host: "pro-tune.de"

```

Meine in ISPConfig eingetragenden Nginx-Direktiven sehen wie folgt aus:

```
##subroot public ##

location / {
        try_files $uri $uri/ /shopware.php$is_args$args;
    }

    location /recovery/install {
      index index.php;
      try_files $uri /recovery/install/index.php$is_args$args;
    }

```

Hat jemand eine Idee was da schief läuft oder wie ich das Debuggen kann?

Vielen Dank

Ronny

---

<div class="post-metadata">

**Author:** ![Shopwareianer](https://avatars.discourse-cdn.com/v4/letter/s/b4bc9f/32.png) [@Shopwareianer](https://forum.shopware.com/u/Shopwareianer)\
**Post date:** [19. Oktober 2019 um 08:13 UTC](https://forum.shopware.com/t/installation-unter-nginx-und-ispconfig/62494/2 "2019-10-19T08:13:13Z")

</div>

Shopware 6 ist im Prinzip eine Symfony Application. Nehm also einfach mal die Symfony nginx config:

[https://symfony.com/doc/current/setup/web\_server\_configuration.html#nginx](https://symfony.com/doc/current/setup/web_server_configuration.html#nginx)

```
location / {
        # try to serve file directly, fallback to index.php
        try_files $uri /index.php$is_args$args;
    }

```

Und wenn ich mich nicht ganz täusche ist der Document Root /public&nbsp;  
Evtl. auch das einmal überprüfen.

```
root /dein/root/zu/shopware6/public;

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![Ciatronical](https://avatars.discourse-cdn.com/v4/letter/c/c77e96/32.png) [@Ciatronical](https://forum.shopware.com/u/Ciatronical)\
**Post date:** [19. Oktober 2019 um 15:55 UTC](https://forum.shopware.com/t/installation-unter-nginx-und-ispconfig/62494/3 "2019-10-19T15:55:24Z")

</div>

Danke für deine Antwort. Die Installation hat erstmal geklappt.  
Folgende Einstallungen brachten den Erfolg:

PHP-FPM FastCGI Prozess Manager: static

Php:

```
upload_max_filesize = 32M
memory_limit = 1024M

```

Nginx:

```
##subroot public ##

location / {
    try_files $uri /index.php$is_args$args;
}
location /recovery/install {
    index index.php;
    try_files $uri /recovery/install/index.php$is_args$args;
}

```

&nbsp;

---

<div class="post-metadata">

**Author:** ![mamamia](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@mamamia](https://forum.shopware.com/u/mamamia)\
**Post date:** [21. November 2019 um 19:30 UTC](https://forum.shopware.com/t/installation-unter-nginx-und-ispconfig/62494/4 "2019-11-21T19:30:58Z")

</div>

Hallo Kollegen

ich bekomme SW6 bei mir einfach nicht zu laufen unter nginx. Meine nginx config ist die für&nbsp;Symfony (es laufen auch alle meine anderen Symfony Anwendungen bei mir). Verzeichnisrechte stimmen. Install und Update musste ich allerdings einfügen:&nbsp;

server {  
&nbsp; &nbsp; listen 80;  
&nbsp; &nbsp; server\_name shopware6.local;  
&nbsp; &nbsp; root /mnt/c/svn/sw6/public;  
&nbsp; &nbsp; index shopware.php index.php;

&nbsp; &nbsp; access\_log off;  
&nbsp; &nbsp; error\_log &nbsp;/var/log/nginx/sw6-error.log error;

&nbsp; &nbsp; location /recovery/install/ {  
&nbsp; &nbsp; &nbsp; &nbsp; index index.php;  
&nbsp; &nbsp; &nbsp; &nbsp; try\_files $uri /recovery/install/index.php$is\_args$args;  
&nbsp; &nbsp; }

&nbsp; &nbsp; location /recovery/update/ {  
&nbsp; &nbsp; &nbsp; &nbsp; location /recovery/update/assets {  
&nbsp; &nbsp; &nbsp; &nbsp; }  
&nbsp; &nbsp; &nbsp; &nbsp; if (!-e $request\_filename){  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rewrite . /recovery/update/index.php last;  
&nbsp; &nbsp; &nbsp; &nbsp; }  
&nbsp; &nbsp; }

&nbsp; &nbsp; location / {  
&nbsp; &nbsp; &nbsp; &nbsp; try\_files $uri /index.php$is\_args$args;  
&nbsp; &nbsp; }

&nbsp; &nbsp;location ~ .php$ {  
&nbsp; &nbsp; &nbsp; &nbsp; fastcgi\_split\_path\_info ^(.+.php)(/.+)$;  
&nbsp; &nbsp; &nbsp; &nbsp; include fastcgi.conf;  
&nbsp; &nbsp; &nbsp; &nbsp; fastcgi\_pass 127.0.0.1:9000;  
&nbsp; &nbsp; &nbsp; &nbsp; internal;  
&nbsp; &nbsp; }

}

Im besten Fall komme ich soweit, dass die .env datei nicht gefunden wird vom Installer. (Der Fehler wurde hier im Forum schon diskutiert, allerdings ohne Lösung)  
_Unable to read the .env&nbsp;environment file. in /sw6/vendor/symfony/dotenv/Dotenv.php:484_

Legt man diese Datei leer per Hand an kommt ein anderer Fehler.  
_The options ‘driver’ or ‘driverClass’ are mandatory if no PDO instance is given to DriverManager::getConnection()._

Fügt man die MySQL-Zugangsdaten ein, findet er die Tabellen nicht (aber klar - Installer lief ja nie durch).

Über Hinweise und Hilfe wäre ich dankbar 😉

---

<div class="post-metadata">

**Author:** ![mamamia](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@mamamia](https://forum.shopware.com/u/mamamia)\
**Post date:** [23. November 2019 um 08:35 UTC](https://forum.shopware.com/t/installation-unter-nginx-und-ispconfig/62494/5 "2019-11-23T08:35:50Z")

</div>

lösung für alle verzweifelten: installation via konsole:

cd public  
php recovery/install/index.php&nbsp;&nbsp;

dann läuft alles einwandfrei durch…
