很多用户反映,网站上提供的Android手机应用程序文件“xxx.apk”,用IE浏览器下载,扩展名就被自动被重命名成了“xxx.zip”,拷贝到手机上无法安装。由于APK文件本身就是压缩包,如果用户的电脑上装了WinRAR(85%的装机量),用IE下载APK文件,扩展名就会被自动改为“.zip”。
如果你的下载服务器为Nginx服务器,那么,在Nginx安装目录下的conf/mime.types文件的对应位置,加上以下一行语句,指定APK文件的MIME类型为 application/vnd.android.package-archive 即可:
application/vnd.android.package-archive apk;
还有iphone手机的文件安装包的nginx的mime.types配置:
application/iphone pxl ipa;
下面是各种文件名后缀在nginx的mime.types中的配置:
text/vnd.sun.j2me.app-descriptor jad;
application/java-archive jar war ear;
application/x-java-archive-diff jardiff;
application/vnd.android.package-archive apk;
application/vnd.ms-cab-compressed cab;
application/octet-stream bin exe dll;
application/vnd.symbian.install sis;
x-epoc/x-sisx-app sisx;
application/iphone pxl ipa;
application/vnd.palm prc pdb;
application/vnd.webos.ipk ipk;
application/vnd.rim.cod cod;
application/mrp mrp;
x-nokia-widget wgz;
application/octet-stream deb;
|