Results 1 to 3 of 3

Thread: Apache2 mime types

  1. #1
    Join Date
    Jul 2007
    Beans
    42

    Apache2 mime types

    Can anyone tell me how to set up Apache2 to serve application/xhtml+xml? There is supposed to be a mime-type file in the apache2 home folder, but it's not there.

  2. #2
    Join Date
    Dec 2006
    Location
    Chicago
    Beans
    3,839

    Re: Apache2 mime types

    Quote Originally Posted by yahn View Post
    Can anyone tell me how to set up Apache2 to serve application/xhtml+xml? There is supposed to be a mime-type file in the apache2 home folder, but it's not there.
    Maybe you need to edit this file.
    /etc/apache2/mods-available/mime.conf

  3. #3
    Join Date
    Apr 2013
    Beans
    1

    Re: Apache2 mime types

    I was looking for the same information, here is my findings:

    In the file: /etc/apache2/mods-available/mime.conf
    you can add/override MIME types in the section "AddType"
    however by default it tells Apache to load the mime types from /etc/mime.types

    In Ubuntu server version 12.04 those mime types are already listed in /etc/mime.types as
    application/xhtml+xml xhtml xht
    application/xml xml xsl xsd

    so they should be loaded by default.

    fyi: I was looking for this information to add .dat and .pac, but they are also already in there.
    application/x-ns-proxy-autoconfig pac dat


    The problem that I had was the file permissions on the wpad.dat file in the apache directory /var/www
    When I pointed my web browser at the file ( http://apachewebserver/wpad.dat ) it could not read it and got an error "Permission Denied".
    Once I fixed the permissions on the file the browser was then able to read the file and prompted me to download or open with application.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •