Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Background

We just migrated our website to a new server. Both the old and the new servers run/ran CentOS 5.5 and Apache 1.3.33. However, after the migration we have not been able to download any files from the Microsoft Office family of products that are hosted on our website. Though FTP transfers succeed, HTTP requests fail. Following is the message I see in Firebug:

400 No Host matches server name dairymgt.info

Attempted Solution

I spoke to the customer service and they suggested that I add the appropriate MIME types to the .htaccess file. I went ahead and added the following (as suggested here) to the .htaccess file that exists at the root of our website:

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

However, this doesn't seem to have helped a bit. I still get the same error message.

I have tested the downloads with PDF and ZIP files and they download fine. Also, I am able to download any of the MS Office files using an FTP client. Somehow the HTTP requests fail.

Update 1: If I just rename any of the MS Office files to have extensions .zip or .tar.gz, they download fine! This definitely means that Apache is treating files with certain extensions (specifically the MS Office ones) in a different manner. Could Apache handlers and/or filters be the culprits?

Any pointers to where the issue could be? I am comfortable editing Apache configuration files, but do not have access to Apache core configuration files as I am on shared hosting.

Thank you.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

After much interaction with the support staff, they (actually the "Advanced Hosting Support" team) fixed the issue. They had to add the following to our .htaccess file for .xls and .xlsx file types. Something similar would be needed for other MS Office file types:

SetEnvIf REQUEST_URI ^/(.*)/*.xls$ no-jk
SetEnvIf REQUEST_URI ^/(.*)/*.xlsx$ no-jk

Please read the documentation for the mod_setenvif module for more details.

Hope this helps someone.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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