apache with docx

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
andreasreschke
Posts: 10
Joined: 2010/04/22 09:22:41

apache with docx

Post by andreasreschke » 2010/07/13 13:36:07

Hello,
I've a webserver with a lot of documentary to serve. Some of the users have problems with the new microsoft documents like docx. Internet explorer 7 want to open the file like a zip-file not as word document. I've googelt around and found a solution that didn't work for me:
http://www.webdeveloper.com/forum/showthread.php?t=162526

I've added at /etc/mime.types

application/vnd.ms-word.document.macroEnabled.12 .docm
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
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.openxmlformats-officedocument.presentationml.slideshow ppsx
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.openxmlformats-officedocument.spreadsheetml.sheet xlsx
application/vnd.ms-excel.template.macroEnabled.12 xltm
application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx

After a restart of httpd , nothing chance, always the same failure with internet explorer 7.

Is there any other solution for me?

Centos 5.5 x86_64


Thanks
Andreas

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

apache with docx

Post by pschaff » 2010/07/13 14:32:21

[quote]
andreasreschke wrote:
Hello,
I've a webserver with a lot of documentary to serve. Some of the users have problems with the new microsoft documents like docx. Internet explorer 7 want to open the file like a zip-file not as word document. I've googelt around and found a solution that didn't work for me:
http://www.webdeveloper.com/forum/showthread.php?t=162526

I've added at /etc/mime.types
[/quote]
May be grasping at straws, but the first 5 lines the example in the reference you cited are not listed.

[quote]
application/vnd.ms-word.document.macroEnabled.12 .docm
[/quote]
No "." before docm in the /etc/mime.types format.

[quote]
After a restart of httpd , nothing chance, always the same failure with internet explorer 7.

Is there any other solution for me?
[/quote]
Perhaps use the following text on your page:[code]
This site works best with standards-compliant browsers such as Firefox, [... your list of supported browsers].[/code]
:-D

User avatar
TrevorH
Forum Moderator
Posts: 31322
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: apache with docx

Post by TrevorH » 2010/07/13 14:56:11

Does your /etc/httpd/conf/httpd.conf refer to /etc/mime.types like
[code]
TypesConfig /etc/mime.types
[/code]

andreasreschke
Posts: 10
Joined: 2010/04/22 09:22:41

Re: apache with docx

Post by andreasreschke » 2010/07/14 06:38:34

[quote]
TrevorH wrote:
Does your /etc/httpd/conf/httpd.conf refer to /etc/mime.types like
[code]
TypesConfig /etc/mime.types
[/code][/quote]

Yes, I have
[code]
TypesConfig /etc/mime.types
[/code]

Anything more?

Andreas

User avatar
TrevorH
Forum Moderator
Posts: 31322
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: apache with docx

Post by TrevorH » 2010/07/14 11:22:36

I put a docx file up on my Apache server and went to download it with IE8 on my XP machine and it recognised it immediately as an MS Word doc. I didn't have to make any changes to Apache to have that happen. I then tried the same thing on IE8 on a Vista machine and got the prompt to open it as a Zip file, then hacked on /etc/mime.types to add

[code]
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
[/code]

to it, did a `service httpd graceful` and it changed from offering me it as a Zip file to an "unknown" document (that machine does not have MS Office installed). I did find that I had to restart IE8 on the target machine to get it to pick up any changes that I made - if I didn't then it continued to offer me the docx document as the type that was in effect when I first went to download it in that session.

I tried the mime.types line with both a space and a tab between the mime type and the extension and both worked. I also installed OpenOffice on that machine and then it comes up and tells me that it's an MS Word doc - but removing the line from /etc/mime.types at this point has it revert to telling me that it's a zipped folder.

Could you have a 2nd TypesConfig line?

Post Reply

Return to “CentOS 5 - Server Support”