Subdomains & Refused to apply style from because its MIME

#1
Hello Everyone,
I am not sure why this is happening but whenever I run PHP scripts from a subdomain all CSS styling gets blocked. Error below

Refused to apply style from 'https://myserverdomain/core/css/inputs.css?v=01e1acf1c8e4e96724ace9637a185763' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

Refused to execute script from '<URL>' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
login:153 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' 'unsafe-eval'". Either the 'unsafe-inline' keyword, a hash ('sha256-9yQTlGBd5SMUeAK1fYfLjlqMM4x+o6EOB/WFeEoHUVo='), or a nonce ('nonce-...') is required to enable inline execution.

They all seem to be block but it all works fine on parent domain.

CentOS 7, CWP Panel

Any help would be much appreciated.

Thank you

Rockyuk
 
Last edited:

Germont

Well-Known Member
#2
Do you use a Control Panel? For example in cPanel there is Advanced > MIME Types.
See if there is a particular setting there, aside System MIME Types.
Other than that, maybe a solution could be to backup both database and subdomain directory, and then delete it from account.
Then recreate the subdomain, and restore the directory content. That's how I solved a index file problem for a subdomain.

Be sure you don't mess the backup, so you have something available to restore.
*********
you can disable mod_security for that subdomain, maybe it's a bad configuration.
I wouldn't leave it disabled too much, that's how I got hacked by an exploit.
 
#3
I am using CWP Pro control panel for CentOS 7, its PHP configuration is coming from Litespeed to it has to be something within Litespeed causing the issue. Top level domains work fine only happens when I use a subdomain and I need my subdomains to work.

Do you use a Control Panel? For example in cPanel there is Advanced > MIME Types.
See if there is a particular setting there, aside System MIME Types.
Other than that, maybe a solution could be to backup both database and subdomain directory, and then delete it from account.
Then recreate the subdomain, and restore the directory content. That's how I solved a index file problem for a subdomain.

Be sure you don't mess the backup, so you have something available to restore.
*********
you can disable mod_security for that subdomain, maybe it's a bad configuration.
I wouldn't leave it disabled too much, that's how I got hacked by an exploit.
 

Pong

Administrator
Staff member
#4
"its PHP configuration is coming from Litespeed", no, PHP configuration is a separate thing and not from LiteSpeed.

What's your real domain URL for us to check? Better log a ticket with us.
 
Top