简体   繁体   English

正确设置 Apache2 以避免使用 Microsoft OneDrive 上传超时

[英]Properly setting up Apache2 to avoid upload timeouts with Microsoft OneDrive

I have a simple Perl script that uploads a file from an HTML form, and it does works.我有一个简单的 Perl 脚本,它可以从 HTML 表单上传一个文件,它确实有效。 ie Uploads a file from my local Mac HD to my web server via a webpage.即通过网页将文件从我本地的 Mac HD 上传到我的 web 服务器。

What I have noticed, however, if I try to upload files from Microsoft's OneDrive I am more likely to get the following info below.然而,我注意到,如果我尝试从 Microsoft 的 OneDrive 上传文件,我更有可能在下面获得以下信息。 I have no problems using my OneDrive via Mac's Finder, or my iPhone, etc.我通过 Mac 的 Finder 或我的 iPhone 等使用我的 OneDrive 没有问题。

access.log访问日志

[14/Feb/2022:23:36:51 -0500] "POST /cgi-bin/upload2.pl HTTP/1.1" 408 487 "http://example.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15" [14/Feb/2022:23:36:51 -0500] "POST /cgi-bin/upload2.pl HTTP/1.1" 408 487 "http://example.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.2 Safari/605.1.15"

error.log错误日志

[Mon Feb 14 23:37:02.121496 2022] [cgi:error] [pid 3734:tid 140367391328000] (70007)The timeout specified has expired: [client -.-.-.-:58184] AH01225: Error reading request entity data, referer: http://example.com/ [Mon Feb 14 23:37:02.121496 2022] [cgi:error] [pid 3734:tid 140367391328000] (70007)指定的超时已过期:[client -.-.-.-:58184] AH01225:读取请求实体时出错数据,引用者: http://example.com/

My Apache2 settings are:我的 Apache2 设置是:

Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5

At my slim level of knowledge of Apache, I am assuming that my problem is all about timing.以我对 Apache 的微薄了解,我假设我的问题全是时间问题。 If that's the case, can I change settings above to help?如果是这样,我可以更改上面的设置来提供帮助吗? Or am I off base?还是我离题了?

*One small thing I noticed, but I don't know if it means anything *我注意到的一件小事,但我不知道它是否意味着什么

My web browser says:我的 web 浏览器说:

Server timeout waiting for the HTTP request from the client.服务器等待来自客户端的 HTTP 请求超时。 and it mentions port 80.它提到了端口 80。

However, in the error.log it mentions port 58184. I don't know if that's normal, due to routers, other routine behavior.但是,在 error.log 中它提到了端口 58184。我不知道这是否正常,由于路由器和其他例行行为。

Set KeepAlive to Off - it seems to have a detrimental effect with busy Apache servers.将 KeepAlive 设置为 Off - 它似乎对繁忙的 Apache 服务器有不利影响。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM