[apache] HTTPS 백엔드 서버와 통신하도록 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/

아파치 서버처럼 구성하면 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.

아파치 오류 로그에는 다음과 같이 표시됩니다.

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)

HTTPS 서버와 통신하도록 http 서버를 구성하는 방법은 무엇입니까?



답변

서버는 필요한 것을 정확히 알려줍니다. [Hint: SSLProxyEngine]

해당 지시문을 지시문 VirtualHost앞에 추가해야합니다 Proxy.

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

자세한 내용은 문서를 참조하십시오 .


답변

제 경우에는 서버가 https 모드에서만 작동하도록 구성되어 있었고 http 모드에 액세스하려고하면 오류가 발생했습니다. 그래서 도움이 http://my-service되도록 변경 합니다 https://my-service.


답변