# Http statt https beim Installieren

**URL:** <https://forum.shopware.com/t/http-statt-https-beim-installieren/103810>\
**Category:** Installation / Einstieg\
**Tags:** installation--gettin\
**Created:** [22. April 2024 um 18:53 UTC](https://forum.shopware.com/t/http-statt-https-beim-installieren/103810 "2024-04-22T18:53:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nets](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@nets](https://forum.shopware.com/u/nets)\
**Post date:** [22. April 2024 um 18:53 UTC](https://forum.shopware.com/t/http-statt-https-beim-installieren/103810/1 "2024-04-22T18:53:50Z")

</div>

Guten Tag!

Ich möchte Shopware 6 installieren und laufen dabei in einen „mixed content“ Fehler

Mixed Content: The page at ‚[Setup | Shopware 6](https://sw2.vanill.at/installer)‘ was loaded over a secure connection, but contains a form that targets an insecure endpoint ‚[Setup | Shopware 6](http://sw2.vanill.at/installer)‘. This endpoint should be made available over a secure connection.

Shopware 6 läuft in einem Caddy, PHP, MySQL Container hinter einem Caddy Reverse Proxy (den ich brauche, da weitere Caddy, PHP, MySQL Container auf dem virtuellen Server laufen)

Was ich bereits versucht habe

- [How to Configure Symfony to Work behind a Load Balancer or a Reverse Proxy (Symfony Docs)](https://symfony.com/doc/current/deployment/proxies.html)

also eine framework.yaml symfony.yaml erstellt in /config/packages/prod

siehe hier

```auto
---
framework:
    trusted_proxies: '0.0.0.0/0, 10.0.0.0/8, 172.18.0.2/16'
    trusted_headers: ['x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-prefix']

```

(`/config/packages/prod/framework.yaml` und `/config/packages/prod/symfony.yaml` haben den selben Inhalt)

Danach den Symfony Cache geleert

`docker exec -it 71c6d07bacf6 php bin/console cache:clear`

```auto
Warning: Failed to load plugins. Message: An exception occurred in the driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for lcmp-mysql-1 failed: Name does not resolve

 // Clearing the cache for the prod environment with debug false

Warning: Failed to load plugins. Message: An exception occurred in the driver: SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo for lcmp-mysql-1 failed: Name does not resolve

 [OK] Cache for the "prod" environment (debug=false) was successfully cleared.

```

- TRUSTED\_PROXIES in der .env festgelegt

```auto
###> shopware/core ###
APP_ENV=prod
APP_URL=https://sw2.vanill.at
TRUSTED_PROXIES=172.18.0.2
APP_SECRET=<redacted>
INSTANCE_ID=<redacted>
BLUE_GREEN_DEPLOYMENT=0
DATABASE_URL=mysql://root:root@localhost/shopware
# With Shopware 6.4.17.0 the MAILER_DSN variable will be used in this template instead of MAILER_URL
MAILER_URL=null://null
###< shopware/core ###

###> symfony/messenger ###
# Choose one of the transports below
# MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages
# MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages
# doctrine://default?auto_setup=0
###< symfony/messenger ###

###> symfony/mailer ###
# MAILER_DSN=null://null
###< symfony/mailer ###

###> symfony/lock ###
# Choose one of the stores below
# postgresql+advisory://db_user:db_password@localhost/db_name
LOCK_DSN=flock
###< symfony/lock ###

###> shopware/elasticsearch ###
OPENSEARCH_URL=http://localhost:9200
SHOPWARE_ES_ENABLED=0
SHOPWARE_ES_INDEXING_ENABLED=0
SHOPWARE_ES_INDEX_PREFIX=sw
SHOPWARE_ES_THROW_EXCEPTION=1
###< shopware/elasticsearch ###

###> shopware/storefront ###
STOREFRONT_PROXY_URL=http://localhost
SHOPWARE_HTTP_CACHE_ENABLED=0
SHOPWARE_HTTP_DEFAULT_TTL=7200
###< shopware/storefront ###

```

Die IP des Reverse Proxies habe ich mit

herausgefunden

`docker network inspect caddy`

```auto
[
    {
        "Name": "caddy",
        "Id": "6e20a019f8849c9d7852a556cbb2bd4e2a0aa6b2017af37d4d2b631b06f39ea5",
        "Created": "2024-04-19T22:43:34.366677882+02:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "172.18.0.0/16",
                    "Gateway": "172.18.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "0e9572b26cc92d1551cbcc2c0211385b613e9cba67d45ac52e00c82a21d0974f": {
                "Name": "lcmpsw2-caddy-lcmp-sw2-1",
                "EndpointID": "45bbffbf2f5258574942cc9634631e3fd34efffee49be3c8880ddacfb4fa968b",
                "MacAddress": "02:42:ac:12:00:04",
                "IPv4Address": "172.18.0.4/16",
                "IPv6Address": ""
            },
            "71c6d07bacf6a5040c8bbb3682244d66676344721cbda2e3177d1f6d388644db": {
                "Name": "lcmpsw2-php-lcmp-sw2-1",
                "EndpointID": "dcf08f35a3e6fd03f66a809cbd3b7667b858414ac8d93e133cd602544e1c36ad",
                "MacAddress": "02:42:ac:12:00:03",
                "IPv4Address": "172.18.0.3/16",
                "IPv6Address": ""
            },
            "a5b1aeae0a4935fb62e915b2ff2744703bed41c400b4d0bec90b666bae7a9c04": {
                "Name": "lcmpxt1-apache-lcmp-xt1-1",
                "EndpointID": "db0273d7f0b20fa64fcaa98067dc775f9a97440b36180e373fe61320bfc293d1",
                "MacAddress": "02:42:ac:12:00:05",
                "IPv4Address": "172.18.0.5/16",
                "IPv6Address": ""
            },
            "b5f8fc1cbccfc5774cc4894b3777fa4681386e31ef6203be373bf3990d9ce5af": {
                "Name": "srv-caddy-1",
                "EndpointID": "eb6788962f50b0cc29c57862fa0a7c3a8b0d84e4d66926b2159819b8b7ea326f",
                "MacAddress": "02:42:ac:12:00:02",
                "IPv4Address": "172.18.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]

```

Berechtigungen wurden mittels  
`docker exec -it lcmpsw2-php-lcmp-sw2-1 chown -R www-data:www-data /var/www/html`

angepasst.

Ich weiß echt nicht mehr, was ich hier tun soll, um das beheben.  
Andere Shopsysteme konnten fehlerfrei installiert werden und laufen ohne Fehler mit dem selben Container Setup.

Hier eine Illustration zur Veranschaulichung

[[docker - Shopware 6 mixed content error when using reverse proxy - Stack Overflow](https://stackoverflow.com/questions/78215770/shopware-6-mixed-content-error-when-using-reverse-proxy)]([https://Frage](https://Frage) auf StackOverflow)

Ich bin für jeden Tipp absolut dankbar!

---

<div class="post-metadata">

**Author:** ![Christian.Saeum](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/christian.saeum/32/15763_2.png) [@Christian.Saeum](https://forum.shopware.com/u/Christian.Saeum)\
**Post date:** [13. Mai 2024 um 07:41 UTC](https://forum.shopware.com/t/http-statt-https-beim-installieren/103810/2 "2024-05-13T07:41:43Z")

</div>

konntest du es lösen?

Ich stehe mit Traefik gerade vor einen ähnlichen Problem!

---

<div class="post-metadata">

**Author:** ![nets](https://avatars.discourse-cdn.com/v4/letter/n/c68b51/32.png) [@nets](https://forum.shopware.com/u/nets)\
**Post date:** [13. Mai 2024 um 13:32 UTC](https://forum.shopware.com/t/http-statt-https-beim-installieren/103810/3 "2024-05-13T13:32:07Z")

</div>

Hallo,

ja ich konnte es lösen, ich musste in Shopware die index.php abändern, siehe hier [Shopware hinter Reverse Proxy nutzt http statt https - #9 von nets](https://forum.shopware.com/t/shopware-hinter-reverse-proxy-nutzt-http-statt-https/101323/9)
