Shopware 4.3.0 auf Plesk 11.5 + Nginx 1.5.0

Hier die funktionierende Config für “echtes” nginx Hosting unter Plesk 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 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; }