I'm trying to set up an internal mediawiki site with version 1.19 on RHEL 6.2 with Apache. On loading any wiki page, Mozilla reports

Error: The stylesheet http_and_ipaddress/mediawiki/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cskins.vector&only=styles&skin=vector&* was not loaded because its MIME type, "text/html", is not "text/css". Source File: http_and_ipaddress/mediawiki/index.php/Main_Page Line: 0

[I'm substituting the protocol and ip to make serverfault happy]

Yet upon checking my access_log, I see 304 reponses

Y.Y.Y.Y - - [08/Apr/2013:19:52:26 +0000] "GET /mediawiki/load.php?debug=false&lang=en&modules=mediawiki.legacy.commonPrint%2Cshared%7Cskins.vector&only=styles&skin=vector&* HTTP/1.1" 304 - "http_and_ipaddress/mediawiki/index.php/Main_Page" "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20111104 Red Hat/3.6.24-3.el6_1 Firefox/3.6.24"

My assumption is that something (other than the stylesheet) is being returned. Do I have an issue with my Aliases?

Alias /mediawiki/index.php           /var/www/html/mediawiki119/index.php
Alias /mediawiki/load.php            /var/www/html/mediawiki119/load.php
Alias /mediawiki/api.php             /var/www/html/mediawiki119/api.php
Alias /mediawiki/opensearch_desc.php /var/www/html/mediawiki119/opensearch_desc.php
Alias /mediawiki/skins               /var/www/html/mediawiki119/skins
Alias /mediawiki/images              /var/www/html/mediawiki119/images
Alias /mediawiki                     /var/www/html/mediawiki119/index.php

# Remove this after installing.
#Alias /mediawiki/mw-config               /var/www/mediawiki119/mw-config

<Directory /var/www/mediawiki119>
  Options FollowSymLinks
  DirectoryIndex index.html index.html.var index.php

<Directory /var/www/mediawiki>
  Options FollowSymLinks
  DirectoryIndex index.html index.html.var index.php

<Directory /var/www/mediawiki/images>
  Options -Indexes
  • It could be interesting to know what is the content returned by the server for this request – Kdecherf Apr 8 '13 at 20:44

I was having this exact same problem, with the same exact distro. I got the rpm from the EPEL repository. Though it appears fixed in your instance, for me the load.php entry was not being created in the conf.d/mediawiki119.conf file. It also wasn't creating the symlink from /var/www/mediawiki119/load.php to /user/share/mediawiki119/load.php.

For those who don't have a self fixing server like @benf if you fix those two things it will work.

The load.php script was a new feature that loads the skins which is probably why they forgot it in some of the configuration files.

  • 1
    Absolutely check the .conf file, if load.php is missing then the style sheets will not work. Good find, @khaki54 – Walt Stoneburner May 21 '14 at 19:51

It turns out this was working, but the browser I was using (Firefox 3.6) was not loading the stylesheet. I was able to load the site properly in a different browser (and then in FF after clearing the cache)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.