My Mautic version is: 2.16.2
My PHP version is: 7.3.17-1+ubuntu18.04.1+deb.sury.org+1
My problem is:
I have 2 problems that I think are related somehow. Tracking pixels and JS code load fine in the browser, but their http code is 404, same for the forms, but for these, they don’t even work when I try to embed them in a website.
curl -I https://mymauticinstall.com/mtc.js
set-cookie: 7bb85555927bdb8d66d3d0ee6d04ad51=ap53f7bm8auttj8o1hqqlso3aa; path=/; secure; HttpOnly
date: Mon, 04 May 2020 22:41:30 GMT
This file when loaded in a browser shows the correct content, but it also shows a 404 error, same for the JS that loads the forms. But in the case of the forms as I said, it prevents them from working completely, so nothing gets rendered.
These errors are showing in the log:
2020/05/04 17:39:49 [debug] 28961#28961: *1 http filename: “/home/forge/mymauticinstall.com/public/mtc.js”
2020/05/04 17:39:49 [debug] 28961#28961: *1 add cleanup: 00005627D28D57B8
2020/05/04 17:39:49 [error] 28961#28961: *1 open() “/home/forge/mymauticinstall.com/public/mtc.js” failed (2: No such file or directory), client: 188.8.131.52, server: mymauticinstall.com, request: “HEAD /mtc.js HTTP/2.0”, host: “mymauticinstall.com”
2020/05/04 17:39:49 [debug] 28961#28961: *1 http finalize request: 404, “/mtc.js?” a:1, c:1
2020/05/04 17:39:49 [debug] 28961#28961: *1 http special response: 404, “/mtc.js?”
2020/05/04 17:39:49 [debug] 28961#28961: *1 internal redirect: “/index.php?”
Steps I have tried to fix the problem:
I’ve searched the internet multiple times, tried several different configurations and tried to debug this on my own. Searched the forums and github for answers. Also tried stackoverflow and other similar sites. Nothing.
add_header ‘Access-Control-Allow-Origin’ “*”;
Any help is appreciated, thanks.