Configure web server to handle .air files
Recently over at the website of our open source Digital Asset Management company Razuna Ltd., we published a desktop application that was build with Adobe AIR.
Now, while we could easily link to the AIR application, which all end with an extension of “.air”, within the web page it would prompt the user to install the application only under FireFox (both Windows and MacOS X), but users with Safari or Internet Explorer where prompted to download a “.zip” file.
In order to fix this, we had to change the mime type configuration of the web server itself. Now, we figured that there are different solution to this, depending on your web server;
Adding the mime type for .air extensions with Apache requires you edit the file “/etc/mime.types” (on RedHat/CentOS) and adding the line:
Make sure to reboot Apache to apply the changes.
Adding mime types for your Tomcat installation requires you to edit the file “tomcat/conf/web.xml” and adding a new “mime-mapping” like;
Make sure to restart Tomcat to apply the change.
If you can’t access the server config files or you simply don’t want to, then the other option is to simply add the mime type to your .htaccess file. Add the following line to it;
AddType application/vnd.adobe.air-application-installer-package+zip .air
Save it and you should be all set to make it possible to launch the Adobe AIR installer ones your .air file is downloaded.