Fix ie download apk into zip:android mobile app file download server configuration workaround

Source: Internet
Author: User
Tags nginx server

Fix IE apk into zip:android mobile app file download server configuration workaround

The apk file is actually in the zip format, but the suffix name is modified to APK, after decompression through unzip, you can see the Dex file, Dex is the full name of Dalvik VM executes, that is, Android Dalvik execution program, not Java The bytecode of me is the Dalvik byte code. Since the APK file itself is a compressed package, if the user's computer is loaded with WinRAR (85% installed capacity), using IE to download the apk file, the extension will be automatically changed to ". zip".

If your download server is an Nginx server, then in the Nginx installation directory of the conf/mime.types file corresponding location, plus the following line of statements, the specified APK file MIME type is application/ Vnd.android.package-archive can:

Application/vnd.android.package-archive apk;

Note: The above configuration is only in the Nginx layer good, but if you are using Nginx+tomcat way, under IE will still become a zip

You also need to configure Conf/web.xml in Tomcat to specify the APK type

<mime-mapping>

<extension>apk</extension>

<mime-type>application/vnd.android.package-archive</mime-type>

</mime-mapping>

Note: When you re-test, you must turn off IE browser to restart one to take effect (closing tab bar does not work)

=================================================

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.