# Error Log /mtc.js failed. (No such file or directory)

**URL:** <https://forum.mautic.org/t/error-log-mtc-js-failed-no-such-file-or-directory/25032>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [August 12, 2022, 8:10am UTC](https://forum.mautic.org/t/error-log-mtc-js-failed-no-such-file-or-directory/25032 "2022-08-12T08:10:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dd052](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dd052/32/663_2.png) [@dd052](https://forum.mautic.org/u/dd052)\
**Post date:** [August 12, 2022, 8:10am UTC](https://forum.mautic.org/t/error-log-mtc-js-failed-no-such-file-or-directory/25032/1 "2022-08-12T08:10:51Z")

</div>

**Your software**  
My Mautic version is: 4.4.1  
My PHP version is: 7.4.30  
My Database type and version is: MySQL8

**Your problem**  
My problem is: error appearing in log file

These errors are showing in the log: 2022/08/12 17:49:00 [error] 135785#135785: \*1644 open() “/home/user/htdocs/mautic.mysite.com/mtc.js” failed (2: No such file or directory), client: 66.249.66.89, server: [mautic.mysite.com](http://mautic.mysite.com), request: “GET /mtc.js HTTP/1.1”, host: “[mautic.mysite.com](http://mautic.mysite.com)”, referrer: “[https://mysite.com/](https://mysite.com/)”

Steps I have tried to fix the problem: not sure what the problem is. Looking for some help. Tried searching this forum.

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [August 12, 2022, 10:32am UTC](https://forum.mautic.org/t/error-log-mtc-js-failed-no-such-file-or-directory/25032/2 "2022-08-12T10:32:03Z")

</div>

Hi, do you see this file in the given folder?

---

<div class="post-metadata">

**Author:** ![dd052](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dd052/32/663_2.png) [@dd052](https://forum.mautic.org/u/dd052)\
**Post date:** [August 12, 2022, 11:09am UTC](https://forum.mautic.org/t/error-log-mtc-js-failed-no-such-file-or-directory/25032/3 "2022-08-12T11:09:57Z")

</div>

Hi Joey,  
No this file is missing in that directory?

---

<div class="post-metadata">

**Author:** ![joeyk](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/joeyk/32/11164_2.png) [@joeyk](https://forum.mautic.org/u/joeyk)\
**Post date:** [August 12, 2022, 2:50pm UTC](https://forum.mautic.org/t/error-log-mtc-js-failed-no-such-file-or-directory/25032/4 "2022-08-12T14:50:44Z")

</div>

Sorry, I’m wrong I think this is a generated file.  
You won’t find it probably.  
Did you allow rewrite in your Mautic web server or htaccess?

---

<div class="post-metadata">

**Author:** ![dd052](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dd052/32/663_2.png) [@dd052](https://forum.mautic.org/u/dd052)\
**Post date:** [August 12, 2022, 7:53pm UTC](https://forum.mautic.org/t/error-log-mtc-js-failed-no-such-file-or-directory/25032/5 "2022-08-12T19:53:10Z")

</div>

Hi Joey,  
I did my install on an ubuntu 22.04 server using Cloudpanel which is supposed to work with Mautic and uses nginx as the webserver. As far as allowing rewrite in my web server or htaccess, I didn’t change anything, just did a standard install following Cloudpanel’s instructions. Looking at the htaccess file, the rewrite module is on. My Vhost install below.

> server {  
> listen 80;  
> listen [::]:80;  
> listen 443 ssl http2;  
> listen [::]:443 ssl http2;  
> {{ssl\_certificate\_key}}  
> {{ssl\_certificate}}  
> server\_name [mysite.com](http://mysite.com);  
> {{root}}
> 
> {{nginx\_access\_log}}  
> {{nginx\_error\_log}}
> 
> if ($scheme != “https”) {  
> rewrite ^ https://$host$uri permanent;  
> }
> 
> location ~ /.well-known {  
> auth\_basic off;  
> allow all;  
> }
> 
> {{settings}}
> 
> location ~ ^/(config|tmp|core|lang) {  
> return 403;  
> }
> 
> location ~ /.ht {  
> return 403;  
> }
> 
> try\_files $uri $uri/ /index.php?$args;  
> index index.php index.html;
> 
> location ~ .php$ {  
> include fastcgi\_params;  
> fastcgi\_intercept\_errors on;  
> fastcgi\_index index.php;  
> fastcgi\_param SCRIPT\_FILENAME $document\_root$fastcgi\_script\_name;  
> try\_files $uri =404;  
> fastcgi\_read\_timeout 3600;  
> fastcgi\_send\_timeout 3600;  
> fastcgi\_param HTTPS $fastcgi\_https;  
> fastcgi\_pass 127.0.0.1:{{php\_fpm\_port}};  
> fastcgi\_param PHP\_VALUE “{{php\_settings}}”;  
> }
> 
> location ~\* ^.+.(css|js|jpg|jpeg|gif|png|ico|gz|svg|svgz|ttf|otf|woff|woff2|eot|mp4|ogg|ogv|webm|webp|zip|swf)$ {  
> add\_header Access-Control-Allow-Origin “\*”;  
> expires max;  
> access\_log off;  
> }
> 
> if (-f $request\_filename) {  
> break;  
> }  
> }

---

<div class="post-metadata">

**Author:** ![dd052](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dd052/32/663_2.png) [@dd052](https://forum.mautic.org/u/dd052)\
**Post date:** [August 12, 2022, 11:54pm UTC](https://forum.mautic.org/t/error-log-mtc-js-failed-no-such-file-or-directory/25032/6 "2022-08-12T23:54:36Z")

</div>

I’ve noticed in other mautic install blog posts that the vhost config file does something with the file extension mtc.js like in this post [Install Mautic Self-Hosted Email Marketing on Ubuntu 18.04 Server](https://www.linuxbabe.com/ubuntu/install-mautic-self-hosted-email-marketing-platform-ubuntu-18-04). Is it possible the install script on cloudpanel is missing some code?

> location ~ /(mtc.js|1.js|mtracking.gif|.\*.gif|mtc) {  
> # default\_type “application/javascript”;  
> try\_files $uri /index.php$is\_args$args;  
> }
