# Shopware 4.3 unter Plesk 12 mit NGINX - Erfahrungen?!

**URL:** https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926
**Category:** Shopware 3.5
**Tags:** general
**Created:** [17. August 2014 um 14:59 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926 "2014-08-17T14:59:46Z")
**Posts on this page:** 20
**Page:** 2

<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: [30. April 2015 um 12:54 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/21 "2015-04-30T12:54:12Z")

</div>

[http://download1.parallels.com/Plesk/Do … =72064.htm](http://download1.parallels.com/Plesk/Doc/en-US/online/plesk-linux-advanced-administration-guide/index.htm?fileName=72064.htm) [http://stackoverflow.com/questions/2095 … -subdomain](http://stackoverflow.com/questions/20953120/plesk-nginx-config-for-every-domain-and-subdomain) [http://dtbaker.net/random-linux-posts/p … tual-host/](http://dtbaker.net/random-linux-posts/plesk-have-a-custom-nginx-conf-per-virtual-host/) Dazu gibt es massig Google Treffer 😉 Allerdings nutzen wir kein Plesk, gibt also keine Garantien :x

---

<div class="post-metadata">

### Author: ![bikerstock](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@bikerstock](https://forum.shopware.com/u/bikerstock)
#### Post date: [30. April 2015 um 13:14 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/22 "2015-04-30T13:14:26Z")

</div>

Nene, da muss es eine Lösung gäben ohne aus der Plesk Oberfläche rauszugehen. Viele der Dateien sind ja von Plesk aus schon vorkonfiguriert. Aber trotzdem Danke 😉

---

<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: [30. April 2015 um 13:18 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/23 "2015-04-30T13:18:36Z")

</div>

Hast du dir den Beitrag denn durchgelesen ? … [quote]Additional nginx directives. You can add several custom nginx directives at once in the Additional nginx directives field. This field corresponds to vhost\_nginx.conf file. [/quote]

---

<div class="post-metadata">

### Author: ![bikerstock](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@bikerstock](https://forum.shopware.com/u/bikerstock)
#### Post date: [30. April 2015 um 13:24 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/24 "2015-04-30T13:24:36Z")

</div>

Ja, korrekt. Aber die Frage ist ja, was schreibt man da rein? Siehe Posts vor mir, wir habe Problem das in diesem Feld nicht alle Befehle akzeptiert werden. Siehe auch unter dem folgendem [Beitrag](http://forum.shopware.com/installation-einstieg-f54/shopware-4-3-0-auf-plesk-11-5-nginx-1-5-0-t21889.html#p102738)

---

<div class="post-metadata">

### Author: ![dogado\_shops](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dogado\_shops](https://forum.shopware.com/u/dogado_shops)
#### Post date: [22. Mai 2015 um 23:48 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/25 "2015-05-22T23:48:52Z")

</div>

Verwende mal folgende Config (“Intelligente Bearbeitung statischer Dateien” einschalten, “Statische Dateien direkt durch Nginx bedienen” aus, “PHP von Nginx verarbeiten lassen” ein. location = / { index index.html index.php shopware.php; rewrite shopware.dll /shopware.php; rewrite files/documents/.\* /engine last; rewrite backend/media/(.\*) /media/$1 last; if (!-e $request\_filename){ rewrite . /shopware.php last; } } # Shopware \>= 4.3 install / update location /recovery/install { index index.php; try\_files $uri /recovery/install/index.php?$args; } location /recovery/update { index index.php; try\_files $uri /recovery/update/index.php?args; } location = /favicon.ico { log\_not\_found off; access\_log off; } location = /templates/\_default/backend/\_resources/resources/css/icon-set.css { gzip off; } ## Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS\_Store (Mac). location ~ /\. { deny all; access\_log off; log\_not\_found off; } ## Deny all attems to access possible configuration files location ~ \.(tpl|yml|ini|log) { deny all; } ## Deny access to media upload folder location ^~ /media/temp/ { deny all; } location ^~ /cache/ { deny all; } location ^~ /files/documents/ { deny all; } # Block direct access to ESDs, but allow the follwing download options: # \* ‘PHP’ (slow) # \* ‘X-Accel’ (optimized) # Also see [http://wiki.shopware.com/ESD\_detail\_111 … ware\_4.2.2](http://wiki.shopware.com/ESD%5C_detail%5C_1116.html#Ab%5C_Shopware%5C_4.2.2) location ^~ /files/552211cce724117c3178e3d22bec532ec/ { internal; } # Breaks backend/media/ rewrite # #location ~ /(engine|files|templates|media)/ { # location ~ .php$ { # return 403; # } #} location ~\* “^/themes/Frontend/Responsive/frontend/\_public/vendors/fonts/open-sans-fontface/(?:.+).(?:ttf|eot|svg|woff)" { expires max; add\_header Cache-Control "public"; access\_log off; log\_not\_found off; } location ~\* "^/themes/Frontend/Responsive/frontend/\_public/src/fonts/(?:.+)\.(?:ttf|eot|svg|woff)” { expires max; add\_header Cache-Control “public”; access\_log off; log\_not\_found off; } location ~\* "^/web/cache/(?:[0-9]{10})\_(?:.+).(?:js|css)" { expires max; add\_header Cache-Control "public"; access\_log off; log\_not\_found off; } ## All static files will be served directly. location ~\* ^.+\.(?:css|cur|js|jpe?g|gif|ico|png|html|xml|pdf) { ## Defining rewrite rules rewrite files/documents/.\* /engine last; rewrite backend/media/(.\*) /media/$1 last; expires 1w; 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; ## Fallback to shopware ## comment in if needed #try\_files $uri @shopware; } ## XML Sitemap support. location = /sitemap.xml { log\_not\_found off; access\_log off; try\_files uri @shopware; } ## robots.txt support. location = /robots.txt { log\_not\_found off; access\_log off; } #location @shopware { # rewrite / /shopware.php; #} location ~ \.php { try\_files $uri $uri/ =404; } location ~ /(engine|images/[a-z]+|files|templates)/ { rewrite files/documents/.\* /engine last; } if (!-e request\_filename){ rewrite ^(.\*) /shopware.php break; }

---

<div class="post-metadata">

### Author: ![ncsnet](https://avatars.discourse-cdn.com/v4/letter/n/8797f3/32.png) [@ncsnet](https://forum.shopware.com/u/ncsnet)
#### Post date: [24. Juni 2015 um 22:01 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/26 "2015-06-24T22:01:48Z")

</div>

Hallo zusammen Hat jemand eine Konfig für die 5er Version? Vielen Dank schon im voraus… Gruss Marc

---

<div class="post-metadata">

### Author: ![dogado\_shops](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dogado\_shops](https://forum.shopware.com/u/dogado_shops)
#### Post date: [28. Juni 2015 um 15:23 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/27 "2015-06-28T15:23:26Z")

</div>

Hi Marc, anbei die Shopware 5 Konfig für Plesk 12 mit nginx und PHP-FPM Handling. nginx Einstellungen in Plesk: Intelligente Bearbeitung statischer Dateien = an Statische Dateien direkt durch Nginx bedienen = aus (diese sind in der Konfig noch mit Expire Direktive optimiert.) PHP von Nginx verarbeiten lassen = an Zusätzliche Nginx-Anweisungen: ----------------------------------------------- location /install/ { location /install/assets { } if (!-e $request\_filename){ rewrite . /install/index.php last; } } location /update/ { location /update/assets { } location /update/templates { } if (!-e $request\_filename){ rewrite . /update/index.php last; } } location /recovery/install/ { location /recovery/install/assets { } if (!-e $request\_filename){ rewrite . /recovery/install/index.php last; } } location /recovery/update/ { location /recovery/update/assets { } if (!-e request\_filename){ rewrite . /recovery/update/index.php last; } } location = /favicon.ico { log\_not\_found off; access\_log off; } location = /templates/\_default/backend/\_resources/resources/css/icon-set.css { gzip off; } ## Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS\_Store (Mac). location ~ /\. { deny all; access\_log off; log\_not\_found off; } ## Deny all attems to access possible configuration files location ~ \.(tpl|yml|ini|log) { deny all; } ## Deny access to media upload folder location ^~ /media/temp/ { deny all; } location ^~ /cache/ { deny all; } location ^~ /files/documents/ { deny all; } # Block direct access to ESDs, but allow the follwing download options: # \* ‚PHP‘ (slow) # \* ‚X-Accel‘ (optimized) # Also see [http://wiki.shopware.com/ESD\_detail\_111 … ware\_4.2.2](http://wiki.shopware.com/ESD%5C_detail%5C_1116.html#Ab%5C_Shopware%5C_4.2.2) location ^~ /files/552211cce724117c3178e3d22bec532ec/ { internal; } # Breaks backend/media/ rewrite # #location ~ /(engine|files|templates|media)/ { # location ~ .php$ { # return 403; # } #} location ~\* „^/themes/Frontend/Responsive/frontend/\_public/vendors/fonts/open-sans-fontface/(?:.+).(?:ttf|eot|svg|woff)" { expires max; add\_header Cache-Control "public"; access\_log off; log\_not\_found off; } location ~\* "^/themes/Frontend/Responsive/frontend/\_public/src/fonts/(?:.+)\.(?:ttf|eot|svg|woff)“ { expires max; add\_header Cache-Control „public“; access\_log off; log\_not\_found off; } location ~\* "^/web/cache/(?:[0-9]{10})\_(?:.+).(?:js|css)" { expires max; add\_header Cache-Control "public"; access\_log off; log\_not\_found off; } ## All static files will be served directly. location ~\* ^.+\.(?:css|cur|js|jpe?g|gif|ico|png|html|xml|pdf) { ## Defining rewrite rules rewrite files/documents/.\* /engine last; rewrite backend/media/(.\*) /media/$1 last; expires 1w; 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; ## Fallback to shopware ## comment in if needed #try\_files $uri @shopware; } ## XML Sitemap support. location = /sitemap.xml { log\_not\_found off; access\_log off; try\_files $uri @shopware; } ## Facebook Export support. location = /backend/export/index/facebook.xml { log\_not\_found off; access\_log off; try\_files $uri @shopware; } ## Export support. location = /backend/export/index/export.xml { log\_not\_found off; access\_log off; try\_files uri @shopware; } ## robots.txt support. location = /robots.txt { log\_not\_found off; access\_log off; } location @shopware { rewrite / /shopware.php; } location ~ \.php { try\_files $uri $uri/ =404; } fastcgi\_param HTTP\_AUTHORIZATION $http\_authorization; ----------------------------------------------- Falls Du eine Shopware 4 auf 5 aktualisieren möchtest, bitte PHP-FPM vor dem Update abschalten (sonst schlägt das Update fehl) - Ursache ist, dass Plesk keine location / Direktive erlaubt. Nach erfolgtem Update kannst Du die o.a. Konfig jedoch wieder aktivieren. Hierzu haben wir einen Workaround entwickelt über ein Plesk Custom-Domain-Template, welches wir auf Anfrage gerne bereitstellen.

---

<div class="post-metadata">

### Author: ![pibivibi](https://avatars.discourse-cdn.com/v4/letter/p/779978/32.png) [@pibivibi](https://forum.shopware.com/u/pibivibi)
#### Post date: [16. Oktober 2015 um 15:07 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/28 "2015-10-16T15:07:27Z")

</div>

Hallo, ich bekomm bei dieser Einstellung immer die Fehlermeldung, dass ich die PHP-Version 5.3 benutzen würde obwohl ich in Plesk 5.6 ausgewählt habe und auch in der PHP\_INFO steht 5.6 drin. Auch wenn ich außerhalb von der shopware.php version\_compare(PHP\_VERSION, ‘5.4.0’, ’

---

<div class="post-metadata">

### Author: ![Kenny](https://avatars.discourse-cdn.com/v4/letter/k/90db22/32.png) [@Kenny](https://forum.shopware.com/u/Kenny)
#### Post date: [29. Oktober 2015 um 00:32 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/29 "2015-10-29T00:32:17Z")

</div>

Hallo, ich finde das Eingabefeld für zusätzliche Nginx-Anweisungen in Plesk 12.0.18 einfach nicht. Ich habe online Screenshots gefunden, die eigentlich zeigen sollten, wo sich das Eingabefeld befindet. Bei mir ist da aber nichts. Hätte jemand nen Tipp? MFG Nils

---

<div class="post-metadata">

### Author: ![bikerstock](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@bikerstock](https://forum.shopware.com/u/bikerstock)
#### Post date: [15. November 2015 um 08:44 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/30 "2015-11-15T08:44:37Z")

</div>

@AIXPRO Vielen Dank für die Konfiguration. Leider kommt ein 403 Fehler. Sobald ich noch folgende Zeilen hinzufüge , funktioniert es: `location = / { index index.html index.php shopware.php; if (!-e $request\_filename){ rewrite . /shopware.php last; } }` Oder kann man bei diesen noch etwas weglassen? Ebenfalls lässt sich das Backend dann nur mit shopware.php/backend aufrufen. Hast du zufällig auch noch die HTTPS Variante parat? @Kenny Hast du nginx-Komponente installiert? Ein neustart der Komponente kann ebenfalls helfen.

---

<div class="post-metadata">

### Author: ![dogado\_shops](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dogado\_shops](https://forum.shopware.com/u/dogado_shops)
#### Post date: [15. November 2015 um 13:35 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/31 "2015-11-15T13:35:29Z")

</div>

@pibivibi: PHP-FPM verwendet ohne weitere Tweaks die serverseitige PHP Version (also nicht die für FastCGI hinterlegte Version). Im Webtatic Repository (siehe [https://webtatic.com/packages/php56/](https://webtatic.com/packages/php56/)) findet Du z.B. entsprechende Pakete, um die serverseitige PHP Version bei CentOS auf PHP 5.6 anzuheben. @Kenny: In Plesk unter Tools & Einstellungen -\> Updates und Upgrades erstmal kontrollieren, ob nginx + PHP-FPM überhaupt installiert sind. Sind beide Dienste installiert und gestartet, kannst Du im jeweiligen Webspace unter „Hosting Einstellungen“ auf PHP-FPM Modus umschalten. Sobald erfolgt, müssen alsdann nginx Direktiven für Shopware unter „Hosting Einstellungen“ um Feld „zusätzliche nginx-Anweisungen“ hinterlegt werden. Folgende nginx Direktiven eignen sich sowohl für HTTPS als auch Shopware 5.1.x location = / { index index.html index.php shopware.php; rewrite shopware.dll /shopware.php; rewrite files/documents/.\* /engine last; rewrite backend/media/(.\*) /media/$1 last; if (!-e $request\_filename){ rewrite . /shopware.php last; } } # Shopware \>= 4.3 install / update location /recovery/install { index index.php; try\_files $uri /recovery/install/index.php?$args; } location /recovery/update { index index.php; try\_files $uri /recovery/update/index.php?args; } location = /favicon.ico { log\_not\_found off; access\_log off; } location = /templates/\_default/backend/\_resources/resources/css/icon-set.css { gzip off; } ## Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS\_Store (Mac). location ~ /\. { deny all; access\_log off; log\_not\_found off; } ## Deny all attems to access possible configuration files location ~ \.(tpl|yml|ini|log) { deny all; } ## Deny access to media upload folder location ^~ /media/temp/ { deny all; } # Shopware \< 5.1 caches location ^~ /cache/ { deny all; } # Shopware \>= 5.1 caches and logs location ^~ /var/ { deny all; } location ^~ /files/documents/ { deny all; } ## Fallback for old media paths location ^~ /media/ { try\_files uri /shopware.php?controller=Media&action=fallback; } # Block direct access to ESDs, but allow the follwing download options: # \* 'PHP' (slow) # \* 'X-Accel' (optimized) # Also see [url=http://wiki.shopware.com/ESD\_detail\_1116.html#Ab\_Shopware\_4.2.2]http://wiki.shopware.com/ESD\_detail\_111 ... ware\_4.2.2[/url] location ^~ /files/552211cce724117c3178e3d22bec532ec/ { internal; } # Breaks backend/media/ rewrite # #location ~ /(engine|files|templates|media)/ { # location ~ \.php { # return 403; # } #} location ~\* „^/themes/Frontend/Responsive/frontend/\_public/vendors/fonts/open-sans-fontface/(?:.+).(?:ttf|eot|svg|woff)" { expires max; add\_header Cache-Control "public"; access\_log off; log\_not\_found off; } location ~\* "^/themes/Frontend/Responsive/frontend/\_public/src/fonts/(?:.+)\.(?:ttf|eot|svg|woff)“ { expires max; add\_header Cache-Control „public“; access\_log off; log\_not\_found off; } location ~\* "^/web/cache/(?:[0-9]{10})\_(?:.+).(?:js|css)" { expires max; add\_header Cache-Control "public"; access\_log off; log\_not\_found off; } ## All static files will be served directly. location ~\* ^.+\.(?:css|cur|js|jpe?g|gif|ico|png|html|xml|pdf) { ## Defining rewrite rules rewrite files/documents/.\* /engine last; rewrite backend/media/(.\*) /media/$1 last; expires 1w; 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; ## Fallback to shopware ## comment in if needed #try\_files $uri @shopware; } ## XML Sitemap support. location = /sitemap.xml { log\_not\_found off; access\_log off; try\_files uri @shopware; } ## robots.txt support. location = /robots.txt { log\_not\_found off; access\_log off; } location ~ \.php { try\_files $uri $uri/ =404; } location ~ /(engine|images/[a-z]+|files|templates)/ { rewrite files/documents/.\* /engine last; } if (!-e request\_filename){ rewrite ^(.\*) /shopware.php break; }

---

<div class="post-metadata">

### Author: ![bikerstock](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@bikerstock](https://forum.shopware.com/u/bikerstock)
#### Post date: [22. Dezember 2015 um 18:47 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/32 "2015-12-22T18:47:19Z")

</div>

@AIXPRO Vielen Dank, funktioniert super. Ich wollte nur noch alles auf die [https://www](https://www). Variante umleiten und habe folgende Zeilen hinzugefügt: `if ($server\_port !~ "^443$"){ set $rule\_0 1; } if ($host !~ www\.(.\*)){ set $rule\_0 1; } if ($rule\_0 = "1"){ rewrite /(.\*) https://www.$server\_name$request\_uri? permanent; }` Habe mit diesem Code leichte Backend Probleme. Um genauer zu sein, die Artikelbilder in dem Medienmanager sowie bei der Artikelbearbeitung werden nicht angezeigt. Mit FireBug ist eine falsche Umleitung der Bilder auf: [https://www.domain.de/backend/media…](https://www.domain.de/backend/media...). zu sehen. Dabei muss das „backend“ aus der URL wegfallen. Eine Idee?

---

<div class="post-metadata">

### Author: ![dogado\_shops](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dogado\_shops](https://forum.shopware.com/u/dogado_shops)
#### Post date: [22. Dezember 2015 um 21:00 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/33 "2015-12-22T21:00:28Z")

</div>

Komisch, dass sich die “echte nginx Server” Fraktion nicht meldet 🙂 Zunächst solltest Du natürlich im Shopware Backend “SSL” und “SSL überall verwenden” aktivieren, damit https:// URL´s hinterlegt werden und es nicht zu einer Menge Redirects für jede Anfrage kommt. In Plesk unter “zusätzliche nginx Anweisungen” im Block ganz oben folgendes ergänzen: ---------------------------------------------- if ($scheme !~\* ^https ){ rewrite ^ https://$server\_name$request\_uri? permanent; } ---------------------------------------------- VG

---

<div class="post-metadata">

### Author: ![bikerstock](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@bikerstock](https://forum.shopware.com/u/bikerstock)
#### Post date: [22. Dezember 2015 um 22:06 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/34 "2015-12-22T22:06:43Z")

</div>

SSL ist überall aktiviert und deine Anweisung ist ja das gleiche wie meine bloß ohne den www. Teil. Ist das selbe Phänomen: Ein 404 beim Laden der Bilder im Backend. URL wird wie folgt aufgebaut: [https://meinedomain.de/backend/media/image/…](https://meinedomain.de/backend/media/image/...). Verstehe nicht ganz wieso das „backend“ noch mit reinkommt zum einen. Zum anderem kann die Homepage mit deiner Variante auch ohne „www“ aufgerufen werden. Zu mindestens das Backend.

---

<div class="post-metadata">

### Author: ![dogado\_shops](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dogado\_shops](https://forum.shopware.com/u/dogado_shops)
#### Post date: [23. Dezember 2015 um 08:42 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/35 "2015-12-23T08:42:05Z")

</div>

Hm - melde Dich mal in unserem Demo Shop an unter [https://shopware5.aixpro.de](https://shopware5.aixpro.de) (Benutzer: admin, Kennwort: aixpro2015) - dieser läuft mit folgenden zusätzlichen nginx Anweisungen als auch PHP7 auf Basis von Plesk 12.5: ------------------------------------------------------------ if ($scheme !~\* ^https ){ rewrite ^ https://$server\_name$request\_uri? permanent; } location = / { index index.html index.php shopware.php; rewrite shopware.dll /shopware.php; rewrite files/documents/.\* /engine last; rewrite backend/media/(.\*) /media/$1 last; if (!-e $request\_filename){ rewrite . /shopware.php last; } } # Shopware \>= 4.3 install / update location /recovery/install { index index.php; try\_files $uri /recovery/install/index.php?$args; } location /recovery/update { index index.php; try\_files $uri /recovery/update/index.php?args; } location = /favicon.ico { log\_not\_found off; access\_log off; } location = /templates/\_default/backend/\_resources/resources/css/icon-set.css { gzip off; } ## Deny all attempts to access hidden files such as .htaccess, .htpasswd, .DS\_Store (Mac). location ~ /\. { deny all; access\_log off; log\_not\_found off; } ## Deny all attems to access possible configuration files location ~ \.(tpl|yml|ini|log) { deny all; } ## Deny access to media upload folder location ^~ /media/temp/ { deny all; } # Shopware \< 5.1 caches location ^~ /cache/ { deny all; } # Shopware \>= 5.1 caches and logs location ^~ /var/ { deny all; } location ^~ /files/documents/ { deny all; } ## Fallback for old media paths location ^~ /media/ { try\_files uri /shopware.php?controller=Media&action=fallback; } # Block direct access to ESDs, but allow the follwing download options: # \* 'PHP' (slow) # \* 'X-Accel' (optimized) # Also see [url=http://wiki.shopware.com/ESD\_detail\_1116.html#Ab\_Shopware\_4.2.2]http://wiki.shopware.com/ESD\_detail\_111 ... ware\_4.2.2[/url] location ^~ /files/552211cce724117c3178e3d22bec532ec/ { internal; } # Breaks backend/media/ rewrite # #location ~ /(engine|files|templates|media)/ { # location ~ \.php { # return 403; # } #} location ~\* “^/themes/Frontend/Responsive/frontend/\_public/vendors/fonts/open-sans-fontface/(?:.+).(?:ttf|eot|svg|woff)" { expires max; add\_header Cache-Control "public"; access\_log off; log\_not\_found off; } location ~\* "^/themes/Frontend/Responsive/frontend/\_public/src/fonts/(?:.+)\.(?:ttf|eot|svg|woff)” { expires max; add\_header Cache-Control “public”; access\_log off; log\_not\_found off; } location ~\* “^/web/cache/(?:[0-9]{10})\_(?:.+).(?:js|css)$” { expires max; add\_header Cache-Control “public”; access\_log off; log\_not\_found off; } ## Defining rewrite rules rewrite files/documents/.\* /engine last; rewrite backend/media/(.\*) /media/$1 last; access\_log off; # The directive enables or disables messages in error\_log about files not found on disk. 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; ## Fallback to shopware ## comment in if needed #try\_files $uri @shopware; ## XML Sitemap support. location = /sitemap.xml { log\_not\_found off; access\_log off; try\_files uri @shopware; } ## robots.txt support. location = /robots.txt { log\_not\_found off; access\_log off; } location ~ \.php { try\_files $uri $uri/ =404; } location ~ /(engine|images/[a-z]+|files|templates)/ { rewrite files/documents/.\* /engine last; } if (!-e request\_filename){ rewrite ^(.\*) /shopware.php break; } ------------------------------------------------------------ Anzumerken ist noch, dass wir aktuell “Statische Dateien direkt durch nginx bedienen” aktiviert haben zur Steuerung der Expires Header. In Plesk 12.5 gibt es einen Bug im Default Domain-Template, welches Angaben zu Expires in Deinen individuellen nginx-Direktiven überschreibt. Bis ein Patch zur Verfügung steht, verwenden wir hierfür ein modifiziertes Custom-Template - diese kannst Du unter /usr/local/psa/admin/conf/templates anlegen. VG

---

<div class="post-metadata">

### Author: ![bikerstock](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@bikerstock](https://forum.shopware.com/u/bikerstock)
#### Post date: [23. Dezember 2015 um 20:56 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/36 "2015-12-23T20:56:49Z")

</div>

Ok, vielen Dank. Es lag an der Shopware Version. Hatte in der Produktivumgebung 5.0.4. Bei 5.1.1 funktioniert alles prima. Ansonsten schöne Feiertage und einen guten Rutsch 😉

---

<div class="post-metadata">

### Author: ![bikerstock](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@bikerstock](https://forum.shopware.com/u/bikerstock)
#### Post date: [15. April 2016 um 13:36 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/37 "2016-04-15T13:36:01Z")

</div>

[@AIXPRO](http://forum.shopware.com/profile/AIXPRO)  
Laufen die Updates bei dir mit dieser Konfiguration problemlos? Oder musst du immer kurz während des Updates auf Apache umstellen?  
&nbsp;

---

<div class="post-metadata">

### Author: ![bikerstock](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@bikerstock](https://forum.shopware.com/u/bikerstock)
#### Post date: [24. Mai 2016 um 20:03 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/38 "2016-05-24T20:03:35Z")

</div>

Jemand eine Info?

---

<div class="post-metadata">

### Author: ![dogado\_shops](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@dogado\_shops](https://forum.shopware.com/u/dogado_shops)
#### Post date: [28. Mai 2016 um 20:45 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/39 "2016-05-28T20:45:55Z")

</div>

Anbei die notwendigen Anpassungen für nginx/PHP-FPM Modus&nbsp;mit&nbsp;Plesk&nbsp;mittels Custom-Config, welche&nbsp;wir bei uns einsetzen.

[https://oc.aix-cloud.de/s/7jsqPfy6BMcnBOx](https://oc.aix-cloud.de/s/7jsqPfy6BMcnBOx)

VG

---

<div class="post-metadata">

### Author: ![bikerstock](https://avatars.discourse-cdn.com/v4/letter/b/3e96dc/32.png) [@bikerstock](https://forum.shopware.com/u/bikerstock)
#### Post date: [30. Mai 2016 um 10:47 UTC](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926/40 "2016-05-30T10:47:56Z")

</div>

Vielen Dank!

Wie sind denn eigentlich die Erfahrungswerte, macht es überhaupt Sinn, nur NGINX zu betreiben. Bei Plesk gibt es noch die Option: Apache + PHP-FPM + NGINX (Proxy) einzusetzen. Gibt es da Leistungsunterschiede? Oder erst ab einer gewissen Menge an Seitenaufrufe?

[Vorherige Seite](https://forum.shopware.com/t/shopware-4-3-unter-plesk-12-mit-nginx-erfahrungen/21926.md?page=1)
