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
相关产品推荐
相关产品推荐

