Hello all!
I’ve been having a hard time troubleshooting an issue. Mautic is not tracking data from my website. I’m running Mautic on a t2.nano routed to http://mautic.[mydomain].com.
My main site is using the Joomla plugin, which is outputting this code:
(function(w,d,t,u,n,a,m){w['MauticTrackingObject']=n;
w[n]=w[n]||function(){(w[n].q=w[n].q||[]).push(arguments)},a=d.createElement(t),
m=d.getElementsByTagName(t)[0];a.async=1;a.src=u;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://mautic.rightoncueservices.com/mtc.js','mt');
In my Chrome Dev Tools, I receive the following error:
Failed to load resource: the server responded with a status of 404 (Not Found) https://mautic.rightoncueservices.com/mtc.js
I tried tail -F /var/log/httpd/*
and found that the server is definitely receiving requests but that it is sending back a 404 error.
I found an article https://www.mautic.org/community/index.php/4626-mtc-js-not-found/0 but it is for Njinx configurations. I’m using Apache.
I think the same problem as above is happening: Apache is trying to simply get a file rather than execute PHP. Not sure if this is the right direction, but it seems like I need to add “js” as a registered php stream. I’m by no means an Apache expert, however. Any suggestions on how to fix this?
System Specs:
System Linux 4.4.44-39.55.amzn1.x86_64 #1 SMP Mon Jan 30 18:15:53 UTC 2017 x86_64
Build Date Jan 18 2017 19:14:03
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php-7.0.conf:/etc
Loaded Configuration File /etc/php.ini
Scan this dir for additional .ini files /etc/php-7.0.d
Additional .ini files parsed /etc/php-7.0.d/20-bz2.ini, /etc/php-7.0.d/20-calendar.ini, /etc/php-7.0.d/20-ctype.ini, /etc/php-7.0.d/20-curl.ini, /etc/php-7.0.d/20-dom.ini, /etc/php-7.0.d/20-exif.ini, /etc/php-7.0.d/20-fileinfo.ini, /etc/php-7.0.d/20-ftp.ini, /etc/php-7.0.d/20-gettext.ini, /etc/php-7.0.d/20-iconv.ini, /etc/php-7.0.d/20-imap.ini, /etc/php-7.0.d/20-intl.ini, /etc/php-7.0.d/20-json.ini, /etc/php-7.0.d/20-mcrypt.ini, /etc/php-7.0.d/20-mysqlnd.ini, /etc/php-7.0.d/20-pdo.ini, /etc/php-7.0.d/20-phar.ini, /etc/php-7.0.d/20-posix.ini, /etc/php-7.0.d/20-shmop.ini, /etc/php-7.0.d/20-simplexml.ini, /etc/php-7.0.d/20-sockets.ini, /etc/php-7.0.d/20-sqlite3.ini, /etc/php-7.0.d/20-sysvmsg.ini, /etc/php-7.0.d/20-sysvsem.ini, /etc/php-7.0.d/20-sysvshm.ini, /etc/php-7.0.d/20-tokenizer.ini, /etc/php-7.0.d/20-xml.ini, /etc/php-7.0.d/20-xmlwriter.ini, /etc/php-7.0.d/20-xsl.ini, /etc/php-7.0.d/20-zip.ini, /etc/php-7.0.d/30-mysqli.ini, /etc/php-7.0.d/30-pdo_mysql.ini, /etc/php-7.0.d/30-pdo_sqlite.ini, /etc/php-7.0.d/30-wddx.ini, /etc/php-7.0.d/30-xmlreader.ini, /etc/php-7.0.d/php.ini
PHP API 20151012
PHP Extension 20151012
Zend Extension 320151012
Zend Extension Build API320151012,NTS
PHP Extension Build API20151012,NTS
Debug Build no
Thread Safety disabled
Zend Signal Handling disabled
Zend Memory Manager enabled
Zend Multibyte Support disabled
IPv6 Support enabled
DTrace Support enabled
Registered PHP Streams https, ftps, compress.zlib, php, file, glob, data, http, ftp, compress.bzip2, phar, zip
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls, tlsv1.0, tlsv1.1, tlsv1.2
Registered Stream Filters zlib.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, bzip2.*, convert.iconv.*, mcrypt.*, mdecrypt.*