gpt4 book ai didi

apache - 如何配置 apache 服务器与 HTTPS 后端服务器通信?

转载 作者:行者123 更新时间:2023-12-03 05:33:27 28 4
gpt4 key购买 nike

我将 apache 服务器配置为反向代理,如果我将后端服务器指定为 HTTP,则它可以正常工作。即:

我将虚拟主机 443 配置为:

ProxyPass /primary/store http://localhost:9763/store/
ProxyPassReverse /primary/store http://localhost:9763/store/

这里用户将访问服务器,如https://localhost/primary/store

这工作正常...但我想配置 HTTP 服务器,例如;

ProxyPass /primary/store https://localhost:9443/store/
ProxyPassReverse /primary/store https://localhost:9443/store/

当我像 apache 服务器一样配置时,出现 500 内部服务器错误。我在这里做错了什么?

我得到的错误是:

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, you@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

在 apache 错误日志中它指出;

nt: SSLProxyEngine]
[Mon Aug 04 00:03:26 2014] [error] proxy: HTTPS: failed to enable ssl support for [::1]:9443 (localhost)
[Mon Aug 04 00:03:31 2014] [error] [client ::1] SSL Proxy requested for localhost:443 but not enabled [Hint: SSLProxyEngine]
[Mon Aug 04 00:03:31 2014] [error] proxy: HTTPS: failed to enable ssl support for [::1]:9443 (localhost)
[Mon Aug 04 00:03:51 2014] [error] [client ::1] SSL Proxy requested for localhost:443 but not enabled [Hint: SSLProxyEngine]
[Mon Aug 04 00:03:51 2014] [error] proxy: HTTPS: failed to enable ssl support for [::1]:9443 (localhost)

如何配置http服务器与HTTPS服务器通信?

最佳答案

您的服务器准确地告诉您需要什么:[提示:SSLProxyEngine]

您需要将该指令添加到 VirtualHost 中的 Proxy 指令之前:

SSLProxyEngine on
ProxyPass /primary/store https://localhost:9763/store/
ProxyPassReverse /primary/store https://localhost:9763/store/

See the doc for more detail .

关于apache - 如何配置 apache 服务器与 HTTPS 后端服务器通信?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25107654/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com