# Shopware 6.6 Storefront-Watcher und NGINX

**URL:** <https://forum.shopware.com/t/shopware-6-6-storefront-watcher-und-nginx/106484>\
**Category:** Shopware 6 (German)\
**Created:** [12. Februar 2025 um 07:56 UTC](https://forum.shopware.com/t/shopware-6-6-storefront-watcher-und-nginx/106484 "2025-02-12T07:56:23Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sev03](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@Sev03](https://forum.shopware.com/u/Sev03)\
**Post date:** [12. Februar 2025 um 07:56 UTC](https://forum.shopware.com/t/shopware-6-6-storefront-watcher-und-nginx/106484/1 "2025-02-12T07:56:24Z")

</div>

Hi,  
wir verwende ein Setup mit Nginx (vorab hier geht es rein ums dev-Setup), welches für Shopware 6.5 einwandfrei funktionierte. Shopware 6.6 ebenfalls, jedoch bekomme ich aktuell nur beim Storefront-Watcher folgenden Fehler in der Konsole selbst:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/shopware/original/3X/8/3/832f67f109680f73e2817719a7cd0fab81378ddd.png)

Kompiliert wird alles soweit ohne Fehler, versucht habe ich schon einiges, jedoch leider ohne Erfolg. Mein letzter Anhaltspunkt wäre dieser noch, den ich im Readme im Storefront-Vendor gefunden habe, jedoch greift keine der Lösungen die ich ausprobiert habe:

## Node.js 17+: ECONNREFUSED issue with IPv6 and localhost ([#705](https://github.com/chimurai/http-proxy-middleware/issues/705))

Nginx Config sieht so aus:

```auto
worker_processes 1;
error_log stderr warn;
pid /run/nginx.pid;

events {
    worker_connections 1024;
}

http {
    include mime.types;
    default_type application/octet-stream;

    # Define custom log format to include reponse times
    log_format main_timed '$remote_addr - $remote_user [$time_local] "$request" '
                          '$status $body_bytes_sent "$http_referer" '
                          '"$http_user_agent" "$http_x_forwarded_for" '
                          '$request_time $upstream_response_time $pipe $upstream_cache_status';

    access_log /dev/stdout main_timed;
    error_log /dev/stderr notice;

    keepalive_timeout 65;

    # Write temporary files to /tmp so they can be created as a non-privileged user
    client_body_temp_path /tmp/client_temp;
    proxy_temp_path /tmp/proxy_temp_path;
    fastcgi_temp_path /tmp/fastcgi_temp;
    uwsgi_temp_path /tmp/uwsgi_temp;
    scgi_temp_path /tmp/scgi_temp;

    # Hide nginx version in headers
    server_tokens off;

    # maximum file upload size
    client_max_body_size 256M;

    map_hash_max_size 8192;
    map_hash_bucket_size 256;
    map $request_uri $redirect {
        default 0;
    }

    # Default server definition
    server {
        listen 8000 default_server;
        listen [::]:8000 default_server;
        server_name localhost;

        gzip on;
        gzip_proxied any;
        gzip_types
            text/plain
            text/html
            text/css
            application/xml
            application/javascript
            application/x-javascript;
        gzip_proxied no-cache no-store private expired auth;
        gzip_min_length 100;

        sendfile off;

        root /sw6/public;

        index index.php index.html;

        if ($redirect) {
            return 301 $redirect;
        }

        location / {
            # First attempt to serve request as file, then
            # as directory, then fall back to index.php
            try_files $uri $uri/ /index.php?q=$uri&$args;
        }

        # Redirect server error pages to the static page /50x.html
        error_page 502 503 504 /50x.html;
        location = /50x.html {
            root /usr/share/nginx/html;
        }

        location ~* ^.+\.(?:css|cur|js|jpe?g|gif|ico|png|svg|webp|html|woff|woff2|xml)$ {
            expires 1y;
            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;

            try_files $uri /index.php$is_args$args;
        }

        location ~* ^.+\.svg$ {
            add_header Content-Security-Policy "script-src 'none'";
        }

        location ~ [^/]\.php(/|$) {
            fastcgi_split_path_info ^(.+?\.php)(/.*)$;
            if (!-f $document_root$fastcgi_script_name) {
                return 404;
            }

            proxy_buffers 16 16k;
            proxy_buffer_size 16k;
            proxy_connect_timeout 300s;
            proxy_send_timeout 300s;
            proxy_read_timeout 300s;
            send_timeout 300s;
            client_body_buffer_size 128k;

            # Mitigate https://httpoxy.org/ vulnerabilities
            fastcgi_param HTTP_PROXY "";

            fastcgi_pass shopware:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param SCRIPT_NAME $fastcgi_script_name;
            fastcgi_param HTTP_HOST localhost:8000; # needed for hot reloading to work
            fastcgi_param HTTP_X_FORWARDED_PORT 8000; # needed for hot reloading to work
            fastcgi_param HTTP_X_FORWARDED_PROTO http;
            http2_push_preload on;

            include fastcgi_params;
        }

        location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
            expires 5d;

            try_files $uri $uri/ /index.php?q=$uri&$args;
        }

        # Deny access to . files, for security
        location ~ /\. {
            log_not_found off;
            deny all;
        }

        # Allow fpm ping and status from localhost
        location ~ ^/(fpm-status|fpm-ping)$ {
            access_log off;
            allow 127.0.0.1;
            deny all;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
            fastcgi_pass shopware:9000;
        }
    }

    #Storefront Watcher proxy
    server {
        listen 9998;
        server_name default_server;

        location / {
            proxy_pass http://shopware:9998;
            proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
            proxy_set_header Host "localhost:8000";
        }
    }

    #Admin Watcher proxy
    server {
        listen 8888;
        server_name default_server;

        location / {
            proxy_pass http://shopware:8080;
            proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
            proxy_set_header Host "localhost:8000";
        }
    }
}

```

Im docker-compose habe ich einen shopware (php-service) sowie eine mariadb und nginx (alle auch so benannt)

Bin jetzt nicht der Experte mit nginx, daher danke für jeglichen Input.

---

<div class="post-metadata">

**Author:** ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)\
**Post date:** [12. Februar 2025 um 08:41 UTC](https://forum.shopware.com/t/shopware-6-6-storefront-watcher-und-nginx/106484/2 "2025-02-12T08:41:39Z")

</div>

Inhaltlich kann ich dazu nichts sagen, ich lese nur Node17… für 6.6 ist Node20 Voraussetzung, wenn ich mich recht erinnere.

---

<div class="post-metadata">

**Author:** ![Sev03](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@Sev03](https://forum.shopware.com/u/Sev03)\
**Post date:** [12. Februar 2025 um 10:13 UTC](https://forum.shopware.com/t/shopware-6-6-storefront-watcher-und-nginx/106484/3 "2025-02-12T10:13:06Z")

</div>

Node 20 ist installiert per Dockerfile.

---

<div class="post-metadata">

**Author:** ![NacScha](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@NacScha](https://forum.shopware.com/u/NacScha)\
**Post date:** [6. Januar 2026 um 08:00 UTC](https://forum.shopware.com/t/shopware-6-6-storefront-watcher-und-nginx/106484/4 "2026-01-06T08:00:22Z")

</div>

@Sev03 Konntest du den Fehler finden/beheben?

---

<div class="post-metadata">

**Author:** ![Sev03](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@Sev03](https://forum.shopware.com/u/Sev03)\
**Post date:** [7. Januar 2026 um 07:16 UTC](https://forum.shopware.com/t/shopware-6-6-storefront-watcher-und-nginx/106484/5 "2026-01-07T07:16:49Z")

</div>

Hi,

ich habe einen “halben” Workaround nur dafür gefunden. Der funktioniert aber nicht gerade super.  
Im Verkaufskanal eine weitere Domain mit nginx:8000 anlegen (je nachdem welchen Port du hast) und dann beim watcher diese auswählen aber weiterhin mit localhost:8000 aufrufen.

Dann funktioniert zwar der Watcher aber die Bilder werden nicht angezeigt. zumindest für die JS Themen die ich bisher hatte ausreichend, aber sicher nicht optimal.

---

<div class="post-metadata">

**Author:** ![NacScha](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@NacScha](https://forum.shopware.com/u/NacScha)\
**Post date:** [9. Januar 2026 um 06:29 UTC](https://forum.shopware.com/t/shopware-6-6-storefront-watcher-und-nginx/106484/6 "2026-01-09T06:29:15Z")

</div>

Hi,

Also bei mir funktioniert es jetzt so, tatsächlich ganz easy (version 6.7.x). Wichtig war tatsächlich dass **APP\_ENV=dev** gesetzt war.

### nginx.conf:

```auto
server {
    listen 80;
    server_name shop1.localhost localhost;

    location / {
      proxy_pass http://apache/;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
    }
  }

  server {
    listen 80;
    server_name watcher.localhost;

    location / {
      proxy_pass http://apache2:9998;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
    }
  }

```

### docker-compose ports:

apache:  
- „22:22“  
- „9998:9998“  
- „9999:9999“  
- „8888:8888“  
- „443:443“  
- "5173-6333:5173-6333

nginx:  
- „80:80“

Dann kann ich den watcher, wenn einmal gestartet, ganz einfach über „watcher.localhost“ aufrufen.

---

<div class="post-metadata">

**Author:** ![Sev03](https://avatars.discourse-cdn.com/v4/letter/s/5f8ce5/32.png) [@Sev03](https://forum.shopware.com/u/Sev03)\
**Post date:** [9. Januar 2026 um 07:05 UTC](https://forum.shopware.com/t/shopware-6-6-storefront-watcher-und-nginx/106484/7 "2026-01-09T07:05:53Z")

</div>

Hättest du eventuell das ganze nginx.conf File, lediglich mit diesen Anpassungen hauts bei mir leider nicht hin.

---

<div class="post-metadata">

**Author:** ![NacScha](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@NacScha](https://forum.shopware.com/u/NacScha)\
**Post date:** [9. Januar 2026 um 07:32 UTC](https://forum.shopware.com/t/shopware-6-6-storefront-watcher-und-nginx/106484/8 "2026-01-09T07:32:04Z")

</div>

Ich verwende halt aktuell kein SSL lokal.

### Nginx

```auto

worker_processes 1;

events {
  worker_connections 1024;
}

http {
  upstream apache {
    server apache2:80;
  }

  server {
    listen 80;
    server_name shop1.localhost localhost;

    location / {
      proxy_pass http://apache/;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
    }
  }

  server {
    listen 80;
    server_name watcher.localhost;

    location / {
      proxy_pass http://apache2:9998;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
    }
  }

  server {
    listen 80;
    server_name admin-watcher.localhost;

    location / {
      proxy_pass http://apache2:8888;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
    }
  }

  server {
    listen 80;
    server_name adminer.localhost;

    location / {
      proxy_pass http://adminer:8080;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
    }
  }

  server {
    listen 80;
    server_name mailcatcher.localhost;

    location /assets/ {
        proxy_pass http://apache2/assets/;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
      }

    location /messages/ {
        proxy_pass http://apache2/mailcatcher/messages;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
      }

    location / {
      proxy_pass http://apache2/mailcatcher;
      proxy_set_header Host $host;
      proxy_set_header X-Real-IP $remote_addr;
    }
  }
}

```

### Verkaufskanaldomain

Im Verkaufskanal hab ich als domain ausschließlich ‚[http://shop1.localhost](http://shop1.localhost)‘.

### Environment Variablen

Ansonsten musst du glaube deine Werte in der .env/.env.local überprüfen:

```auto
APP_ENV=dev

APP_URL=http://localhost

APP_URL_CHECK_DISABLED=1 #Hilft damit das PopUp im Adminbereich nicht kommt

```
