Office 2007 Mime-Types for Apache

Ran into a problem today where users were trying to download Office 2007
documents from a web site, but were prompted to save them as a Zip file.
Turns out the new extensions for Office 2007 documents (docx, xlsx,
pptx, etc) need to be added with a new mime-type for Apache to serve
them up correctly.

It’s a pretty simple fix.

In /etc/mime.types add this:

application/vnd.openxmlformats docx pptx xlsx

Save and restart Apache, then the documents should be handled correctly.

About Will Chatham

Will Chatham is the Security Assessment Engineer for Arbor Networks. Since Netscape 2.0, he has worked in a wide array of environments including non-profit, corporate, small business, and government. He started as a web developer, moved into Linux system administration, and ultimately found his place as a security professional. Having most recently conquered the OSCP certification, Will continues to hack his way into various things in an effort to make them more secure.
Bookmark the permalink.

5 Comments

  1. could you better explain where to change this

  2. Hi Anna,
    The file you need to edit is in the /etc directory and it is called mime.types

    Hope that helps!

  3. On a WAMP server, it’s under: C:\Program Files\Apache Software Foundation\Apache2.2\conf\mime.types

  4. Thanks for this. I knew the answer had to be out there somewhere! Will save me from endless conversion of docx to doc format.

  5. Tapan Kumar Thapa

    Thanks…

    It works..

    Regards
    Tapan Thapa

Leave a Reply