Apache-大型zip文件传输损坏 [英] Apache - Large zip file transfer corruption

查看:154
本文介绍了Apache-大型zip文件传输损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Ubuntu上运行的Apache服务器,托管着一些可供下载的文件.托管的文件是已安装的nas驱动器.

I have an Apache server running on Ubuntu hosting some files available for download. The files hosted is a mounted nas drive.

我发现,当我尝试通过Web服务器下载大于100MB的大型zip文件(.zip,.7z)时,传输的文件已损坏.我用来检查文件的方法正在执行MD5计算.我还发现文件大小与损坏的可能性有关;较大的文件,极有可能损坏.挂载似乎很好,因为我将文件从NAS传输到计算机上没有任何问题.

I am finding that when I try downloading, via the web server, large zip files (.zip, .7z) of 100MB+ the transferred file is corrupted. The method I am using to check the files is performing a MD5 calculation. I am also finding that the file size correlates with the chance of corruption; bigger file, high chance of corruption. The mount seems to be fine, because I transferred files from NAS to the machine without any issues.

我也有在运行相同文件的Windows上运行的IIS.当我通过此Web服务器下载文件时,永远不会损坏.这使我认为网络本身很好.

I also have IIS running on windows hosting the same files. When I download the files via this web server there is never a corruption. This makes me think that the network itself is fine.

我正在通过Chrome下载文件.

I am downloading the files via Chrome.

我不确定出什么问题,但是我相信这与Apache的某些配置有关.如何提高Apache上文件传输的可靠性?还是有其他可能的问题原因?

I'm not sure what is wrong but I am lead to believe it has to do with some configuration with Apache. How can I increase my file transfer reliability on Apache? Or is there another possible cause of issue?

推荐答案

这是一个Apache配置问题.

It was an Apache configuration issue.

本文

apache2.conf文件中添加EnableSendfile On可以修复大型zip文件的损坏问题. Apache 2.4的默认配置为关闭,而Apache 2.2的默认设置为开启.

Adding EnableSendfile On to the apache2.conf file fixed the corruption issue with large zip files. Apache 2.4 has this configuration default off while Apache 2.2 default its to on.

这篇关于Apache-大型zip文件传输损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆