Dispatcher is installed in Apache HTTP Server 2.x. All files including .js and .css files served from the dispatcher cache are returned with "text/html" Content-Type header value. This breaks the pages in the site.

Environment

AEM Dispatcher installed in Apache HTTP Server 2.2 or later

Cause

There is a misconfiguration of the Apache mod_mime module.

Resolution

  1. Review the Apache .conf files (for example: httpd.conf) and see if the directive below is set. If you find it, then remove it:

    ForceType text/html

  2. Make sure that there is a mime.types file configured, for example:

    TypesConfig conf/mime.types

  3. Open the mime.types file and review the mappings to make sure that the relevant files such as .js and .css are mapped to their proper mime type values.
    Default mime.types file for Apache can be found here:

  4. Set the directive ModMimeUsePathInfo in the AEM site's directive:

    <Location />
    ModMimeUsePathInfo On
    </Location>

  5. Restart Apache HTTP Server.

Šis darbs ir licencēts saskaņā ar Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported licenci  Uz portālā Twitter™ un Facebook izvietotajiem ziņojumiem neattiecas Creative Commons sistēmas noteikumi.

Juridisks paziņojums   |   Tiešsaistes konfidencialitātes politika