<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>A Leased Line to the Collective Unconscious &#187; Internet Explorer</title> <atom:link href="http://www.chichira.com/tag/internet-explorer/feed/" rel="self" type="application/rss+xml" /><link>http://www.chichira.com</link> <description>random scribblings from the other end of the wire</description> <lastBuildDate>Thu, 03 Nov 2011 11:09:38 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>serving Microsoft Office 2007 documents from a Linux PLESK web site</title><link>http://www.chichira.com/2009/06/10/serving-microsoft-office-2007-documents-from-a-linux-plesk-web-site/</link> <comments>http://www.chichira.com/2009/06/10/serving-microsoft-office-2007-documents-from-a-linux-plesk-web-site/#comments</comments> <pubDate>Wed, 10 Jun 2009 13:06:13 +0000</pubDate> <dc:creator>RobinLayfield</dc:creator> <category><![CDATA[geek stuff]]></category> <category><![CDATA[Web Development]]></category> <category><![CDATA[Apache]]></category> <category><![CDATA[Internet Explorer]]></category> <category><![CDATA[Microsoft]]></category> <category><![CDATA[Mime-types]]></category> <category><![CDATA[Office 2007 file formats]]></category> <guid
isPermaLink="false">http://www.chichira.com/?p=147</guid> <description><![CDATA[]]></description> <content:encoded><![CDATA[<p>Office 2007 introduced a whole host of new application extensions, most of which aren&#8217;t recognised by the Apache web server.</p><p>What happens if you link to a downloadable file can often be unpredictable; Firefox on OS X will merely download the file. Internet Explorer on the other hand &#8211; even on a system that has Office 2007 installed &#8211; will attempt to treat the file as a compressed file.</p><div
id="attachment_149" class="wp-caption alignnone" style="width: 415px"><img
class="size-full wp-image-149" title="Download dialog showing incorrect file type" src="http://www.chichira.com/wp-content/uploads//picture-13.png" alt="Download dialog showing incorrect file type" width="405" height="288" /><p
class="wp-caption-text">Download dialog showing incorrect file type</p></div><p>Once you choose save in Internet Explorer, it saves it as a compressed file which when you open it gives you a set of resources, similar to a Mac Bundle. It&#8217;s pretty hard to actually get the correct application to launch and run the file as it should (the example above was a PowerPoint pptx file).</p><p>Luckily, help is at hand and all you really need to do is register the new Mime types with Apache. You can either do this at the server level in the Apache configuration file, or on a per-site basis using a .htaccess file.</p><p><strong>Apache config file<br
/> </strong>This file is called httpd.conf for Apache 1 and apache2.conf on Apache 2. There are a number of places it can be so it&#8217;s best to run a file search on the server to find it.</p><p>SSH into your server as root (if possible)<br
/> Run the command  <em><strong>find / -name apache2.conf</strong></em> or    <em><strong>find / -name httpd.conf<br
/> </strong></em>You should now see a file listing which will give you a clue as to where the file will be (most likely etc/apache2 for Apache 2 web servers).<br
/> Edit the file using the command <em><strong>vi /etc/apache2/apache2.conf</strong></em> (if that&#8217;s where the file is)<br
/> Type <em><strong>:10000 </strong></em>to jump to line 10000 (and therefore the end of the file)<br
/> Press <em><strong>I </strong></em>to insert and then newline<br
/> Paste in the following lines:</p><blockquote><p>AddType application/vnd.ms-word.document.macroEnabled.12 .docm<br
/> AddType application/vnd.openxmlformats .docx .pptx .xlsx<br
/> #AddType application/vnd.openxmlformats-officedocument.presentationml.presentation .pptx<br
/> #AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet .xlsx<br
/> AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document .docx<br
/> AddType application/vnd.ms-word.template.macroEnabled.12 .dotm<br
/> AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template .dotx<br
/> AddType application/vnd.ms-powerpoint.template.macroEnabled.12 .potm<br
/> AddType application/vnd.openxmlformats-officedocument.presentationml.template .potx<br
/> AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 .ppam<br
/> AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 .ppsm<br
/> AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow .ppsx<br
/> AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 .pptm<br
/> AddType application/vnd.ms-excel.addin.macroEnabled.12 .xlam<br
/> AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 .xlsb<br
/> AddType application/vnd.ms-excel.sheet.macroEnabled.12 .xlsm<br
/> AddType application/vnd.ms-excel .xlt .xla<br
/> AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template .xltx<br
/> AddType application/vnd.ms-excel.template.macroEnabled.12 .xltm<br
/> AddType application/vnd.ms-xpsdocument .xps<br
/> AddType application/application/vnd.ms-powerpoint .ppt .pot .pps .ppa<br
/> AddType application/msword .doc .dot</p></blockquote><p>Now hit <em><strong>[Esc] </strong></em>to leave insert mode<br
/> Type <em><strong>:wq!</strong></em> to save the file<br
/> Finally restart the apache server, most likely by using the command <em><strong>/etc/init.d/apache2 restart<br
/> </strong></em>Your entire web server should now be able to deliver the correct file types &#8211; problem no more.<br
/> <strong>Per site .htaccess configuration</strong><br
/> Browse to your remote site and open the .htaccess file if it&#8217;s present (make sure that your web / ftp client can see hidden files as dot-prefixed files are traditionally hidden from view on the Linux / Unix platform.</p><p>Create a new file if there isn&#8217;t one present and then simply add in the following lines:</p><blockquote><p>AddType application/vnd.ms-word.document.macroEnabled.12 .docm<br
/> AddType application/vnd.openxmlformats .docx .pptx .xlsx<br
/> #AddType application/vnd.openxmlformats-officedocument.presentationml.presentation .pptx<br
/> #AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet .xlsx<br
/> AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document .docx<br
/> AddType application/vnd.ms-word.template.macroEnabled.12 .dotm<br
/> AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template .dotx<br
/> AddType application/vnd.ms-powerpoint.template.macroEnabled.12 .potm<br
/> AddType application/vnd.openxmlformats-officedocument.presentationml.template .potx<br
/> AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 .ppam<br
/> AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 .ppsm<br
/> AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow .ppsx<br
/> AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 .pptm<br
/> AddType application/vnd.ms-excel.addin.macroEnabled.12 .xlam<br
/> AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 .xlsb<br
/> AddType application/vnd.ms-excel.sheet.macroEnabled.12 .xlsm<br
/> AddType application/vnd.ms-excel .xlt .xla<br
/> AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template .xltx<br
/> AddType application/vnd.ms-excel.template.macroEnabled.12 .xltm<br
/> AddType application/vnd.ms-xpsdocument .xps<br
/> AddType application/application/vnd.ms-powerpoint .ppt .pot .pps .ppa<br
/> AddType application/msword .doc .dot</p></blockquote><p>save the .htaccess file and your web site should start delivering the correct file types!</p><div
id="attachment_150" class="wp-caption alignnone" style="width: 414px"><img
class="size-full wp-image-150" title="correct file format" src="http://www.chichira.com/wp-content/uploads//picture-41.png" alt="Now in pptx format" width="404" height="273" /><p
class="wp-caption-text">Now in pptx format!</p></div> ]]></content:encoded> <wfw:commentRss>http://www.chichira.com/2009/06/10/serving-microsoft-office-2007-documents-from-a-linux-plesk-web-site/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
