You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Apache2配置ProxyPass与ProxyReverse时出现500内部服务器错误的问题求助

Apache2配置ProxyPass与ProxyReverse时出现500内部服务器错误的问题求助

各位大佬好,我最近在配置Apache反向代理时遇到了麻烦,折腾了好久还是一直返回500内部服务器错误,想请大家帮忙看看哪里出问题了🙏

我的需求

我想通过ProxyPass和ProxyPassReverse实现同一个域名下的不同路径指向两台不同服务器,具体想要达成的效果是:

  • 主域名:https://example.com
  • 当访问 https://example.com/quotes 时,实际请求转发到Server B的 https://testing.com/quotes
  • 域名下的其他路径由Server A处理

当前配置

我在启用的站点配置里写了如下内容:

<VirtualHost _default_:443>

Protocols h2 h2c http/1.1

SSLEngine on

SSLProtocol +TLSv1.1 +TLSv1.2

SSLCertificateFile ../../certificate.crt

SSLCertificateKeyFile ../../certificate.key

SSLCACertificateFile ../../certificate.ca-bundle

ProxyRequests Off

<FilesMatch "\.(cgi|shtml|phtml|php)$">

SSLOptions +StdEnvVars

</FilesMatch>

<Directory /usr/lib/cgi-bin>

SSLOptions +StdEnvVars

</Directory>

<Proxy *>

Require all granted

</Proxy>

ProxyPass /quotes https://testing.com/quotes

ProxyPassReverse /quotes https://testing.com/quotes

ErrorLog syslog

LogLevel emerg

</VirtualHost>

但访问https://example.com/quotes时一直返回500内部服务器错误,我是不是漏掉了什么配置?


备注:内容来源于stack exchange,提问作者YaBCK

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.21 08:49:33