• EricB50

    (@ericb50)


    I recently upgraded my localhost runing Lubuntu 21.10 with

    Apache 2 Server version: Apache/2.4.48 (Ubuntu)
    Server built: 2022-01-05T14:29:15

    and PHP 8.0.8

    When I went to check my WP test environment I was surprised to see numerous CSS files failing to load. The console indicating:

    The stylesheet https://localhost/wp-content/plugins/woocommerce/assets/css/twenty-twenty.css?ver=6.3.1 was not loaded because its MIME type, “text/html”, is not “text/css”.

    I’ve tried numerous apache2 config settings in the .conf files but nothing seems to remedy the MIME issue.

    Has anyone encountered this or have some suggestions?

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Dion

    (@diondesigns)

    If even one CSS file is loading with the correct MIME type, then the issue is in WordPress, or one of the loaded themes/plugins.

    If all CSS files have the wrong MIME type, make sure Apache is loading its mime.types file. Your Apache configuration should have a line that looks something like this:

    TypesConfig conf/mime.types

    If it does, and there are no errors in your Apache error log (which is different than the access log), then Apache is not the issue. At that point you should ask your question in the WooCommerce support area.

    Thread Starter EricB50

    (@ericb50)

    It appears to be site-wide as js and css files generate these kinds of errors for all the plugins and themes.

    sudo /etc/init.d/apache2 restart

    Shows no errors

    I’ve added TypesConfig /etc/mime.types to top level apache2.conf (the conf/mime.types generated errors)

    I’ve been chasing the problem on and off for about a week. The WP install didn’t change just apache2 and php8 upgraded and reinstalled, which immediately caused these problems (there is also a live copy running fine). But I’m not sure what to do. Nothing seems to be working.

    • This reply was modified 3 years ago by EricB50.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Problems with new Apache2 install and MIME types’ is closed to new replies.