2021年1月21日星期四

Resource interpreted as Stylesheet but transferred with MIME type text/html: "

Seems like a duplicate? No, it is not!

These are my configurations:

  1. OS: Fedora 33 Server
  2. PHP: PHP 7.4.13
  3. MySQL: MySQL 8.0

I'd set up WordPress on my server like this:

  1. Nginx faces the internet.
  2. Nginx passes requests to PHP-fpm.
  3. PHP-fpm then handle everything after that.

Everything seems to be working fine but I don't know what the heck is going on? Literally, any kind of theme is not working. I've tried so many themes but none of them seems to be working.

Take a look at the page: https://blog.harshrathod.dev

I get this weird warning and the styles to not take effect at all:

Resource interpreted as Stylesheet but transferred with MIME type text/html: "<URL>".  (index):29 Resource interpreted as Stylesheet but transferred with MIME type text/html: "https://php.harshrathod.dev/wp-includes/css/dashicons.min.css?ver=5.6".  (index):30 Resource interpreted as Stylesheet but transferred with MIME type text/html: "https://php.harshrathod.dev/wp-includes/css/admin-bar.min.css?ver=5.6".  (index):31 Resource interpreted as Stylesheet but transferred with MIME type text/html: "https://php.harshrathod.dev/wp-includes/css/dist/block-library/style.min.css?ver=5.6".  (index):32 Resource interpreted as Stylesheet but transferred with MIME type text/html: "https://php.harshrathod.dev/wp-includes/css/dist/block-library/theme.min.css?ver=5.6".  (index):33 Resource interpreted as Stylesheet but transferred with MIME type text/html: "https://php.harshrathod.dev/wp-content/themes/twentynineteen/style.css?ver=1.8".  (index):34 Resource interpreted as Stylesheet but transferred with MIME type text/html: "https://php.harshrathod.dev/wp-content/themes/twentynineteen/print.css?ver=1.8".  

This is my nginx congifguration:

root        /usr/share/wordpress;    location / {      try_files      $uri $uri/ =404;      fastcgi_pass   127.0.0.1:4000;      fastcgi_index  index.php;      fastcgi_param  PATH_INFO        $fastcgi_path_info;      fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;      include        fastcgi_params;  }  
https://stackoverflow.com/questions/65828923/resource-interpreted-as-stylesheet-but-transferred-with-mime-type-text-html-u January 21, 2021 at 09:53PM

没有评论:

发表评论