Shopware 4.3 unter Plesk 12 mit NGINX - Erfahrungen?!

Hm - melde Dich mal in unserem Demo Shop an unter 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