# Mautic v5.1.0 behind Traefik and HTTPS

**URL:** <https://forum.mautic.org/t/mautic-v5-1-0-behind-traefik-and-https/32667>\
**Category:** Product Support\
**Created:** [July 6, 2024, 1:12pm UTC](https://forum.mautic.org/t/mautic-v5-1-0-behind-traefik-and-https/32667 "2024-07-06T13:12:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![csaeum](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/csaeum/32/151_2.png) [@csaeum](https://forum.mautic.org/u/csaeum)\
**Post date:** [July 6, 2024, 1:12pm UTC](https://forum.mautic.org/t/mautic-v5-1-0-behind-traefik-and-https/32667/1 "2024-07-06T13:12:20Z")

</div>

**Your software**  
My Mautic version is: 5.1.0  
My PHP version is: 8.2  
My Database type and version is: MariaDB

**Your problem**  
I installed Mautic again today to use it for a project.

I work with Docker, so Traefik runs as an SSL proxy in front of it.

Mautic itself runs without SSL.

Admin and everything is running, so I adjusted the host in the admin and carried on. But when I wanted to send a form, I noticed that Mautic was running on http, emptied the cache and then noticed that Mautic was no longer running at all.

I changed the host in the config.php to without https and emptied the cache, now it works again.

Now my question: How can I “trick” the config so that I enter http there and everything from the admin works as long as it delivers the host with HTTPS in the “JS forms”?

I have already entered the trusted proxies and also set the variable in the .env, but nothing has worked.

Does anyone have a solution here?

---

<div class="post-metadata">

**Author:** ![csaeum](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/csaeum/32/151_2.png) [@csaeum](https://forum.mautic.org/u/csaeum)\
**Post date:** [July 6, 2024, 3:07pm UTC](https://forum.mautic.org/t/mautic-v5-1-0-behind-traefik-and-https/32667/2 "2024-07-06T15:07:37Z")

</div>

I was now able to use the correct trusted proxy to get Mautic to call [https://domain.example](https://domain.example) under system configuration. That didn’t work before, I had the wrong one.

But even when I call the form via JS, it still wants to call the domain via http.

---

<div class="post-metadata">

**Author:** ![csaeum](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/csaeum/32/151_2.png) [@csaeum](https://forum.mautic.org/u/csaeum)\
**Post date:** [July 6, 2024, 3:46pm UTC](https://forum.mautic.org/t/mautic-v5-1-0-behind-traefik-and-https/32667/3 "2024-07-06T15:46:10Z")

</div>

Okay, problem solved.

After I entered the correct proxy and changed the URL from Mautic to https in the system config, I deleted the cache but you also have to call up the form once and save it again, then the form will also be with https when called.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/1X/43c63600fe51440378769136903f1fa2a9a34102.png) [@system](https://forum.mautic.org/u/system)\
**Post date:** [July 8, 2024, 3:46am UTC](https://forum.mautic.org/t/mautic-v5-1-0-behind-traefik-and-https/32667/4 "2024-07-08T03:46:53Z")

</div>

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.
