Failed to load resource: the server responded with a status of 404

We are moving our production server to a VPS running CentOS, Lightspeed, and Cyberpanel. When previewing the generated site on this server we get a bunch of Failed to load resource errors.

Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
element-internals-polyfill.min.js:1          Failed to load resource: the server responded with a status of 404 (Not Found)
ewcore.min.js:1          Failed to load resource: the server responded with a status of 404 (Not Found)
pace.js:1          Failed to load resource: the server responded with a status of 404 (Not Found)
login:29 Uncaught ReferenceError: ew is not defined
    at login:29:15
login:389 Uncaught ReferenceError: ew is not defined
    at login:389:1
login:395 Uncaught ReferenceError: ew is not defined
    at login:395:1
login:402 Uncaught ReferenceError: ew is not defined
    at login:402:5
login:426 Uncaught ReferenceError: loadjs is not defined
    at login:426:1
login:433 Uncaught ReferenceError: ew is not defined
    at login:433:1
login:620 Uncaught ReferenceError: loadjs is not defined
    at login:620:1
login:631 Uncaught ReferenceError: loadjs is not defined
    at login:631:1
login:707 Uncaught ReferenceError: loadjs is not defined
    at login:707:1
login:725 Uncaught ReferenceError: loadjs is not defined
    at login:725:1
login:822 Uncaught ReferenceError: loadjs is not defined
    at login:822:1

What we have tried so far:

  1. Made sure rewrite was enabled.
  2. Set AllowOverride All and Require all granted in httpd.conf
  3. Set RewriteBase to / in PHPMaker and regenerated
  4. Applied 755 permissions to all folders and files
  5. Rebooted of course

Any help would be appreciated.

Does the URL of your site is changed after migrating to new server?

  1. The errors are 404, make sure you have uploaded the “js” folder.
  2. If you set RewriteBase to “/”, make sure you really do not use base path, i.e. your site is at //mycompany.com, not at //mycompany.com/basepath.

URL changed temporarily as we aren’t changing our DNS records to point to the new site until we know it is working.js folder is uploaded.Unset RewriteBase due to it not solving the issue.

After discussing with our web host they said to try just going for it so we took the risk and pointed the DNS to the new server and it works now! Seems to be an issue with the Cyberpanel preview feature that is causing this. Cyberpanel doesn’t appear to be production ready as there is this issue and another where many users on their forum are discussing a problem that deletes the whole website if you try setting up backups through Cyberpanel. We are currently discussing switching to a different panel like cPanel.