我在Windows和Linux中设置了apache代理服务器 . httpd.conf的配置在windows和linux中都是一样的 . 这就是conf

<Location "/">
  #adding Error document details
   ErrorDocument 502 ${serverroot}/file.html
   ErrorDocument 503  ${serverroot}/file.html
   ProxyPass "https://someurl.com"
   ProxyPassReverse "https://someurl.com"
</Location>

因此,每当proxypass抛出错误502/503时,它都会将其重定向到错误文档,即页面file.html .

当我检查访问日志时,发现Windows和Linux系统中响应的差异 .

在windows ---> POST / HTTP / 1.1“302

在Linux中-----> POST / HTTP / 1.1“502

为什么反应有差异?错误代码302是重定向代码 . 为什么Windows发送重定向错误代码但不发送linux ???