Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top


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

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/ docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/ potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/ ppam
AddType application/ ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/ pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/ xlam
AddType application/ xlsb
AddType application/ xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/ 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
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


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.