# Shopware 5.6.4 bindet bilder falsch ein

**URL:** <https://forum.shopware.com/t/shopware-5-6-4-bindet-bilder-falsch-ein/63907>\
**Category:** Allgemein\
**Created:** [9. Januar 2020 um 19:13 UTC](https://forum.shopware.com/t/shopware-5-6-4-bindet-bilder-falsch-ein/63907 "2020-01-09T19:13:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![GluhDev](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@GluhDev](https://forum.shopware.com/u/GluhDev)\
**Post date:** [9. Januar 2020 um 19:13 UTC](https://forum.shopware.com/t/shopware-5-6-4-bindet-bilder-falsch-ein/63907/1 "2020-01-09T19:13:14Z")

</div>

Hallo,&nbsp;

mein erster beitrag hier und ich brauche eure hilfe&nbsp; ![Gasp](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/11de454286d9e6eb62eece226c8fe8ae7ec6b1be.png "Gasp")

Wenn ich über Einkaufswelten einen Banner (oder allgemein bei Bildern)&nbsp;-\> Bild hochlade und einfüge wird der Pfad richtig angezeigt bei den bannereinstellungen. Habe auch schon lokal geprüft ob das Bild vorhanden ist, was der fall ist. Jedoch wird dann bei dem generierten html code ein andere Pfad generiert, wo kein Bild hinterlegt ist.

Chrome gibt folgendes aus:

Failed to load resource: the server responded with a status of 404 (Not Found)&nbsp; bild.jpg

Ich arbeite mit linux lokal, apache2 und mysql.

Ich bin sehr dankbar für jede Antwort !

Viele Grüße GlühDev

---

<div class="post-metadata">

**Author:** ![TimmeHosting](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/timmehosting/32/15580_2.png) [@TimmeHosting](https://forum.shopware.com/u/TimmeHosting)\
**Post date:** [9. Januar 2020 um 19:21 UTC](https://forum.shopware.com/t/shopware-5-6-4-bindet-bilder-falsch-ein/63907/2 "2020-01-09T19:21:32Z")

</div>

Ist die .htaccess-Datei von Shopware vorhanden, und ist der Apache so konfiguriert, dass der Inhalt befolgt wird?

![](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/1X/385eaa628505df573ebf33722f780335f53ac1b2.png)

Timme Hosting - schnelles nginx-Hosting

[www.timmehosting.de](https://timmehosting.de/)

---

<div class="post-metadata">

**Author:** ![GluhDev](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@GluhDev](https://forum.shopware.com/u/GluhDev)\
**Post date:** [9. Januar 2020 um 19:40 UTC](https://forum.shopware.com/t/shopware-5-6-4-bindet-bilder-falsch-ein/63907/3 "2020-01-09T19:40:53Z")

</div>

Danke für deine Antwort !

.htaccess-Datei von Shopware:

&nbsp;

RewriteEngine on

#RewriteBase /shopware/

# HTTPS config for the backend

#RewriteCond %{HTTPS} !=on  
#RewriteRule backend/(.\*) https://%{HTTP\_HOST}%{REQUEST\_URI} [L,R=301]

RewriteRule shopware.dll shopware.php  
RewriteRule files/documents/.\* engine [NC,L]  
RewriteRule backend/media/(.\*) media/1 [NC,L] RewriteRule custom/.\*(config|menu|services|plugin)\.xml ./shopware.php?controller=Error&action=pageNotFoundError [NC,L]

RewriteCond %{REQUEST\_URI} !(/(engine|files|templates|themes|web)/)  
RewriteCond %{REQUEST\_URI} !(/media/(archive|banner|image|music|pdf|unknown|video)/)  
RewriteCond %{REQUEST\_FILENAME} !-f  
RewriteCond %{REQUEST\_FILENAME} !-d  
RewriteRule ^(.\*)$ shopware.php [PT,L,QSA]

# Fix missing authorization-header on fast\_cgi installations

RewriteRule .\* - [E=HTTP\_AUTHORIZATION:%{HTTP:Authorization},L]

# Restrict access to VCS directories  
  
RedirectMatch 404 /\.(svn|git|hg|bzr|cvs)(/|$)

&nbsp; &nbsp; # Restrict access to root folder files  
&nbsp; &nbsp; RedirectMatch 404 /(autoload.php|composer.(json|lock|phar)|README.md|UPGRADE-(.\*).md|CONTRIBUTING.md|eula.\*.txt|.gitignore|.\*.dist|.env.\*)$

&nbsp; &nbsp; # Restrict access to shop configs files  
&nbsp; &nbsp; RedirectMatch 404 /(web/cache/(config\_\d+.json|all.less))$

&nbsp; &nbsp; # Restrict access to theme configurations  
&nbsp; &nbsp; RedirectMatch 404 /themes/(.\*)(.\*.lock|package.json|.gitignore|Gruntfile.js|all.less|node\_modules/.\*)$

# Staging environment

#SetEnvIf Host “staging.test.shopware.in” SHOPWARE\_ENV=staging

# Development environment

#SetEnvIf Host “dev.shopware.in” SHOPWARE\_ENV=dev  
#SetEnv SHOPWARE\_ENV dev

DirectoryIndex index.html  
DirectoryIndex index.php  
DirectoryIndex shopware.php

# Disables download of configuration

# Deny all requests from Apache 2.4+.  
  
  
  
Require all denied

&nbsp; &nbsp; # Deny all requests from Apache 2.0-2.2.  
&nbsp; &nbsp;   
  
Allow from all

# Enable gzip compression

AddOutputFilterByType DEFLATE text/html text/xml text/plain text/css text/javascript application/javascript application/json application/font-woff application/font-woff2 image/svg+xml

ExpiresActive on  
  
ExpiresDefault “access plus 1 month”

&nbsp; &nbsp;   
  
Header append Cache-Control “public”  
  
Header unset ETag

&nbsp; &nbsp; FileETag None

# Match generated files like:

# 1429684458\_t22\_s1.css

# 1429684458\_t22\_s1.js

Header set Cache-Control “max-age=31536000, public”

&nbsp; &nbsp;   
  
ExpiresActive on  
  
ExpiresDefault “access plus 1 year”

# Disables auto directory index

Options -Indexes

Options -MultiViews

# AddType x-mapp-php7 .php

# AddHandler x-mapp-php7.php

Header append X-Frame-Options SAMEORIGIN  
  
# Uncomment the following line to enable HSTS ([HTTP Strict Transport Security - Wikipedia](https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security)) and force clients to use HTTPS for at least one year (31536000 seconds)  
  
# Header always set Strict-Transport-Security “max-age=31536000”

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![GluhDev](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@GluhDev](https://forum.shopware.com/u/GluhDev)\
**Post date:** [9. Januar 2020 um 19:42 UTC](https://forum.shopware.com/t/shopware-5-6-4-bindet-bilder-falsch-ein/63907/4 "2020-01-09T19:42:07Z")

</div>

Apache2:

# This is the main Apache server configuration file.&nbsp; It contains the

# configuration directives that give the server its instructions.

# See [Apache HTTP Server Version 2.4 Documentation - Apache HTTP Server Version 2.4](http://httpd.apache.org/docs/2.4/) for detailed information about

# the directives and /usr/share/doc/apache2/README.Debian about Debian specific

# hints.

# 

# 

# Summary of how the Apache 2 configuration works in Debian:

# The Apache 2 web server configuration in Debian is quite different to

# upstream’s suggested way to configure the web server. This is because Debian’s

# default Apache2 installation attempts to make adding and removing modules,

# virtual hosts, and extra configuration directives as flexible as possible, in

# order to make automating the changes and administering the server as easy as

# possible.

&nbsp;

# It is split into several files forming the configuration hierarchy outlined

# below, all located in the /etc/apache2/ directory:

# 

# /etc/apache2/

# |-- apache2.conf

# | `--&nbsp; ports.conf

# |-- mods-enabled

# | |-- \*.load

# | `-- \*.conf

# |-- conf-enabled

# | `-- \*.conf

# `-- sites-enabled

# `-- \*.conf

# 

# 

# \* apache2.conf is the main configuration file (this file). It puts the pieces

#&nbsp; &nbsp;together by including all remaining configuration files when starting up the

#&nbsp; &nbsp;web server.

# 

# \* ports.conf is always included from the main configuration file. It is

#&nbsp; &nbsp;supposed to determine listening ports for incoming connections which can be

#&nbsp; &nbsp;customized anytime.

# 

# \* Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/

#&nbsp; &nbsp;directories contain particular configuration snippets which manage modules,

#&nbsp; &nbsp;global configuration fragments, or virtual host configurations,

#&nbsp; &nbsp;respectively.

# 

#&nbsp; &nbsp;They are activated by symlinking available configuration files from their

#&nbsp; &nbsp;respective \*-available/ counterparts. These should be managed by using our

#&nbsp; &nbsp;helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See

#&nbsp; &nbsp;their respective man pages for detailed information.

# 

# \* The binary is called apache2. Due to the use of environment variables, in

#&nbsp; &nbsp;the default configuration, apache2 needs to be started/stopped with

#&nbsp; &nbsp;/etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not

#&nbsp; &nbsp;work with the default configuration.

&nbsp;

&nbsp;

# Global configuration

# 

&nbsp;

# 

# ServerRoot: The top of the directory tree under which the server’s

# configuration, error, and log files are kept.

# 

# NOTE!&nbsp; If you intend to place this on an NFS (or otherwise network)

# mounted filesystem then please read the Mutex documentation (available

# at http:);\</http:\>

# you will save yourself a lot of trouble.

# 

# Do NOT add a slash at the end of the directory path.

# 

#ServerRoot „/etc/apache2“

&nbsp;

# 

# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.

# 

#Mutex file:${APACHE\_LOCK\_DIR} default

&nbsp;

# 

# The directory where shm and other runtime files will be stored.

# 

&nbsp;

DefaultRuntimeDir ${APACHE\_RUN\_DIR}

&nbsp;

# 

# PidFile: The file in which the server should record its process

# identification number when it starts.

# This needs to be set in /etc/apache2/envvars

# 

PidFile ${APACHE\_PID\_FILE}

&nbsp;

# 

# Timeout: The number of seconds before receives and sends time out.

# 

Timeout 300

&nbsp;

# 

# KeepAlive: Whether or not to allow persistent connections (more than

# one request per connection). Set to „Off“ to deactivate.

# 

KeepAlive On

&nbsp;

# 

# MaxKeepAliveRequests: The maximum number of requests to allow

# during a persistent connection. Set to 0 to allow an unlimited amount.

# We recommend you leave this number high, for maximum performance.

# 

MaxKeepAliveRequests 100

&nbsp;

# 

# KeepAliveTimeout: Number of seconds to wait for the next request from the

# same client on the same connection.

# 

KeepAliveTimeout 5

&nbsp;

&nbsp;

# These need to be set in /etc/apache2/envvars

User ${APACHE\_RUN\_USER}

Group ${APACHE\_RUN\_GROUP}

&nbsp;

# 

# HostnameLookups: Log the names of clients or just their IP addresses

# e.g., [www.apache.org](http://www.apache.org) (on) or 204.62.129.132 (off).

# The default is off because it’d be overall better for the net if people

# had to knowingly turn this feature on, since enabling it means that

# each client request will result in AT LEAST one lookup request to the

# nameserver.

# 

HostnameLookups Off

&nbsp;

# ErrorLog: The location of the error log file.

# If you do not specify an ErrorLog directive within a

# container, error messages relating to that virtual host will be

# logged here.&nbsp; If you \*do\* define an error logfile for a

# container, that host’s errors will be logged there and not here.

# 

ErrorLog ${APACHE\_LOG\_DIR}/error.log

&nbsp;

# 

# LogLevel: Control the severity of messages logged to the error\_log.

# Available values: trace8, …, trace1, debug, info, notice, warn,

# error, crit, alert, emerg.

# It is also possible to configure the log level for particular modules, e.g.

# „LogLevel info ssl:warn“

# 

LogLevel warn

&nbsp;

# Include module configuration:

IncludeOptional mods-enabled/\*.load

IncludeOptional mods-enabled/\*.conf

&nbsp;

# Include list of ports to listen on

Include ports.conf

&nbsp;

&nbsp;

# Sets the default security model of the Apache2 HTTPD server. It does

# not allow access to the root filesystem outside of /usr/share and /var/www.

# The former is used by web applications packaged in Debian,

# the latter may be used for local directories served by the web server. If

# your system is serving content from a sub-directory in /srv you must allow

# access here, or in any related virtual host.

Options Indexes FollowSymLinks

AllowOverride All

Require all granted

AllowOverride All

Require all granted

Options Indexes FollowSymLinks

AllowOverride All

Require all granted

#

# Options Indexes FollowSymLinks

# AllowOverride None

# Require all granted

# 

# AccessFileName: The name of the file to look for in each directory

# for additional configuration directives.&nbsp; See also the AllowOverride

# directive.

# 

AccessFileName .htaccess

# 

# The following lines prevent .htaccess and .htpasswd files from being

# viewed by Web clients.

# 

Require all granted

# 

# The following directives define some format nicknames for use with

# a CustomLog directive.

# 

# These deviate from the Common Log Format definitions in that they use %O

# (the actual bytes sent including headers) instead of %b (the size of the

# requested file), because the latter makes it impossible to detect partial

# requests.

# 

# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.

# Use mod\_remoteip instead.

# 

LogFormat „%v:%p %h %l %u %t „%r“ %\>s %O „%{Referer}i“ „%{User-Agent}i““ vhost\_combined

LogFormat „%h %l %u %t „%r“ %\>s %O „%{Referer}i“ „%{User-Agent}i““ combined

LogFormat „%h %l %u %t „%r“ %\>s %O“ common

LogFormat „%{Referer}i -\> %U“ referer

LogFormat „%{User-agent}i“ agent

&nbsp;

# Include of directories ignores editors’ and dpkg’s backup files,

# see README.Debian for details.

# Include generic snippets of statements

IncludeOptional conf-enabled/\*.conf

# Include the virtual host configurations:

IncludeOptional sites-enabled/\*.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

Include /etc/phpmyadmin/apache.conf

---

<div class="post-metadata">

**Author:** ![shyim](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shyim/32/7681_2.png) [@shyim](https://forum.shopware.com/u/shyim)\
**Post date:** [9. Januar 2020 um 20:09 UTC](https://forum.shopware.com/t/shopware-5-6-4-bindet-bilder-falsch-ein/63907/5 "2020-01-09T20:09:41Z")

</div>

Hast du in der config.php eine mediaUrl definiert?

---

<div class="post-metadata">

**Author:** ![GluhDev](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@GluhDev](https://forum.shopware.com/u/GluhDev)\
**Post date:** [9. Januar 2020 um 20:11 UTC](https://forum.shopware.com/t/shopware-5-6-4-bindet-bilder-falsch-ein/63907/6 "2020-01-09T20:11:42Z")

</div>

@Shyim‍ Ich denke nicht wie genau funktioniert das ?

---

<div class="post-metadata">

**Author:** ![GluhDev](https://avatars.discourse-cdn.com/v4/letter/g/eb9ed0/32.png) [@GluhDev](https://forum.shopware.com/u/GluhDev)\
**Post date:** [9. Januar 2020 um 22:01 UTC](https://forum.shopware.com/t/shopware-5-6-4-bindet-bilder-falsch-ein/63907/7 "2020-01-09T22:01:55Z")

</div>

Habe die Lösung gefunden !&nbsp;

Es lag daran, dass php gd nicht installiert war.

Trotzdem vielen dank für die hilfe soweit.
