Neu Verzweifelung mit Produktbildern

someadmin

Mitglied
30. Oktober 2018
7
0
Hallo

Da ich mit meinem Latein nun am Ende bin, erhoffe ich mir hier Hilfe.
Alles funktioniert bestens soweit, jedoch werden Artikelbilder nicht angezeigt.
Habe alles mir mögliche versucht, z.B. Cache leeren/Neu generieren, chmod, Browser Cache leeren, mit anderen Browser getestet, und und und...
Die Bilder werden in der Wawi hochgeladen, ohne Fehlermeldung. Auf dem Server liegen sie dann im Ordner "media/image/storage/" als "240_240_8f28d5acb.............jpg".

Was habe ich vergessen/falsch gemacht?
Hoffe jemand kann mir helfen.

Achja:
JTL Shop 4.06
Wawi 1.3.20.0

LG
 

FPrüfer

Moderator
Mitarbeiter
19. Februar 2016
1.881
529
Halle
Hallo,
existiert der Pfad media/image/product und ist dieser durch den Webserver-Prozess beschreibbar?
 

someadmin

Mitglied
30. Oktober 2018
7
0
Ja, dieser Pfad existiert, darin sind Unterordner für die Größen und die Bilder befinden sich auch darin (gerade nachgeschaut).
Mich wundert das Ganze nur, da das Shop-Logo einwandfrei funktioniert.
 

FPrüfer

Moderator
Mitarbeiter
19. Februar 2016
1.881
529
Halle
Welchen Fehler bekommst du denn, wenn du versuchst ein solches Bild direkt im Browser aufzurufen? Hast du mal eine URL wo man sich das ansehen kann!?
 

someadmin

Mitglied
30. Oktober 2018
7
0
Ok, ich muss sagen, da stehe ich gerade vor einer Wand. Habe leider keine Ahnung, wie ich und vorallem welche .htaccess umschreiben muss, dass der Shop mit Nginx funktioniert. Hat jemand evtl. Erfahrungen damit oder kann mir seine rewrites zur Verfügung stellen?
 

Mirko.Schmidt User deaktiviert

Guest
https://issues.jtl-software.de/issues/SHOP-678
Hier gibt's im Kommentar eine hilfreiche. Einige Pfaden müssen noch angepasst werden.

NGINX:
upstream _php {
    # php via socket - Pfad entsprechend anpassen
    server unix:/var/run/php/php7.0-fpm.sock;
    # alternativ via localhost/port:
    #server 127.0.0.1:9000
}
server {
    listen *:443 http2;
    listen *:80;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
    # für mehr Abwärtskompatibilität:
    #ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4";
    ssl_prefer_server_ciphers on;
    ssl_session_cache shared:SSL:10m;
    ssl_certificate /etc/nginx/ssl/certificate.crt;
    ssl_certificate_key /etc/nginx/ssl/certificate.key;
   
   
    # oder beispielsweise mit Let's encrypt:
    #ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
    #ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
   
    # optional: OCSP stapling
    # zertifikat zu finden unter https://github.com/letsencrypt/website/blob/master/certs/lets-encrypt-x3-cross-signed.pem
    #ssl_stapling on;
    #ssl_stapling_verify on;
    #ssl_trusted_certificate /etc/letsencrypt/live/example.com/lets-encrypt-x3-cross-signed.pem;
    #resolver 8.8.4.4 8.8.8.8;
   
    # optional: DHE - generieren via "openssl dhparam -out /etc/nginx/ssl/dhparam.pem 4096"
    # ssl_dhparam /etc/nginx/ssl/dhparam.pem;
    add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload";
    add_header X-Content-Type-Options nosniff;
    add_header X-XSS-Protection "1; mode=block";
    #add_header Content-Security-Policy "default-src https:; connect-src https:; font-src https: data:; frame-src https:; img-src https: data:; media-src https:;  object-src https:; script-src 'unsafe-inline' 'unsafe-eval' https:; style-src 'unsafe-inline' https:;";
    #add_header X-Frame-Options SAMEORIGIN;
    #add_header Public-Key-Pins 'pin-sha256="<FILLMEOUT>"; pin-sha256="<FILLMEOUT>";max-age=5184000; includeSubDomains';
    server_name example.com
    root   /var/www/shop;
    index index.php index.html;
    error_log /var/log/nginx/example_errors.log notice;
    access_log /var/log/nginx/example_access.log combined buffer=16k;
    include /etc/nginx/fastcgi_params;
    location ~* \.(eot|ttf|woff|woff2|svg|css|less)$ {
        expires max;
        add_header Access-Control-Allow-Origin *;
        add_header Pragma public;
        access_log off;
        log_not_found off;
    }
    location @img_proxy {
        rewrite ^(.*)$ /index.php;
    }
    location ~ \.(gif|jpg|jpeg|png)$ {
        root   /var/www/example;
        try_files $uri @img_proxy;
        expires max;
        add_header Pragma public;
        access_log off;
        log_not_found off;
    }
    location ~* \.(js|css|ico)$ {
        expires max;
        add_header Pragma public;
        access_log off;
        log_not_found off;
    }
    location = /robots.txt {
        allow all;
        log_not_found off;
        access_log off;
    }
    location ~ \.php$ {
        try_files $uri $uri/ =404;
        fastcgi_pass _php;
    }
    rewrite ^/includes/libs/minify/([a-z]=.*) /includes/libs/minify/index.php?$1 last;
    rewrite ^/min/([a-z]=.*) /min/index.php?$1 last;
    rewrite ^/asset/(.*) /includes/libs/minify/index.php?g=$1 last;
    rewrite ^/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /includes/sitemap.php?datei=$1 break;
    location / {
        try_files $uri $uri/ /index.php?q=$uri&$args;
    }
    location /includes {
        location ~cron_inc.php{
            fastcgi_pass _php;
        }
        location ~sitemap.php{
            fastcgi_pass _php;
        }
        location ~preisverlaufgraph.php{
            fastcgi_pass _php;
        }
        location ~preisverlaufgraph_ofc.php{
            fastcgi_pass _php;
        }
        location ~newslettertracker.php{
            fastcgi_pass _php;
        }
        location ~libs/minify/index.php{
            fastcgi_pass _php;
        }
        location ~plugins/kk_dropper/version/(.*)/adminmenu/kk_upload.php{
            fastcgi_pass _php;
        }
        location ~plugins/jtl_amazon/version/(.*)/frontend/ipn.php{
            fastcgi_pass _php;
        }
        location ~plugins/jtl_amazon/version/(.*)/frontend/feed.php{
            fastcgi_pass _php;
        }
        location ~modules/notify.php{
            fastcgi_pass _php;
        }
        location ~modules/libs/kcfinder-2.5.4/themes {
            fastcgi_pass _php;
        }
        location ~modules/paypal/PayPal.class.php{
            fastcgi_pass _php;
        }
        location ~modules/safetypay{
            fastcgi_pass _php;
        }
        location ~captcha/captcha.php{
            fastcgi_pass _php;
        }
        location ~libs/kcfinder/browse.php{
            fastcgi_pass _php;
        }
        location ~libs/kcfinder/upload.php{
            fastcgi_pass _php;
        }
        location ~libs/kcfinder/css.php{
            fastcgi_pass _php;
        }
        location ~libs/kcfinder/js_localize.php{
            fastcgi_pass _php;
        }
        location ~libs/kcfinder-2.5.4/browse.php{
            fastcgi_pass _php;
        }
        location ~libs/kcfinder-2.5.4/upload.php{
            fastcgi_pass _php;
        }
        location ~libs/kcfinder-2.5.4/css.php{
            fastcgi_pass _php;
        }
        location ~libs/kcfinder-2.5.4/js_localize.php{
            fastcgi_pass _php;
        }
        location ~libs/kcfinder-2.5.4/js/browser/joiner.php{
            fastcgi_pass _php;
        }
        location ~ext/uploads_cb.php{
            fastcgi_pass _php;
        }
        location ~plugins/jtl_cdn/(.*)/ajax.php{
            fastcgi_pass _php;
        }
        location ~plugins/jtl_search/(.*)/suggest.php{
            fastcgi_pass _php;
        }
        location ~plugins/jtl_search/(.*)/suggestforward.php{
            fastcgi_pass _php;
        }
        location ~plugins/jtl_ustdownload/(.*)/set_default.php{
            fastcgi_pass _php;
        }
        location ~plugins/evo_editor/(.*)/api.php{
            fastcgi_pass _php;
        }
        location ~ \.php$ {
            deny all;
        }
    }
    location /classes {
        location ~ \.php$ {
            deny all;
        }
    }
    location /templates {
        location ~ \.php$ {
            deny all;
        }
        location ~ \.tpl$ {
            deny all;
        }
    }
    location /jtllogs {
        deny all;
    }
    location /update {
        deny all;
    }
    location /uploads {
        deny all;
    }
    location ~ /\. {
        deny all;
        access_log off;
        log_not_found off;
    }
    location /xhgui {
            try_files $uri $uri/ /xhgui/webroot/index.php?$uri&$args;
    }
}
 

someadmin

Mitglied
30. Oktober 2018
7
0
Also ich habe nun die vHost von Nginx bearbeitet mit dem oben geposteten Beispiel, leider ohne Erfolg. Die Bilder werden immernoch nicht geladen... Einzig und alleine das Shoplogo wird angezeigt. Pfade wurden angepasst. 🙁
 

netzxperts

Aktives Mitglied
16. September 2011
32
4
Hallo, hatte das Problem auch mehrfach und es lag zu 100% zumindest bei mir an der .htaccess - Bei mir hat geholfen, dass ich die mitgelieferte .htaccess genommen habe und dann nur noch das rewrite für https ergänzt habe (z.b. wenn einer von http:// kommt). in der config...php musste auch https://.. usw. stehen , dann funktionierte es bei allen 4er shops die erst keine Bilder zeigten.

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

damit werden dann auch die bilder per https geladen.

Es klingt zumindest so, als wäre das auch dein problem. Hoffe es hilft.

Gruß
Thomas
 

someadmin

Mitglied
30. Oktober 2018
7
0
Danke für die Antwort.
Leider hatte ich auch damit keinen Erfolg, auch wenn ich die .htaccess mal rausnehme.

Gibt es denn kein Tutorial seitens JTL um eine Installation mit NGINX vorzunehmen?
 

Ähnliche Themen