I recently stumbled on the problem of my web server serving .docx files and them becoming .zip.

The problem is that the mime types were not up-to-date so it thought they were zip files.

In order to fix this I added the following to my /etc/mime.types

 application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
 application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
 application/vnd.ms-word.document.macroEnabled.12 .docm
 application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
 application/vnd.ms-powerpoint.template.macroEnabled.12 potm
 application/vnd.openxmlformats-officedocument.presentationml.template potx
 application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
 application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
 application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
 application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
 application/vnd.ms-excel.addin.macroEnabled.12 xlam
 application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
 application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
 application/vnd.ms-excel.template.macroEnabled.12 xltm
 application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx

These are the new mime types for things like docx and xlsx etc.

A quick restart of apache with:

apachectl restart

And the problem was no more.