hoe configureer ik de apache-server om met de HTTPS-backendserver te praten?

Ik heb de apache-server geconfigureerd als een reverse proxy en het werkt prima als ik een backend-server als HTTP aanwijs. Dat is:

Ik heb virtuele host 443 geconfigureerd als:

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

Hier krijgen gebruikers toegang tot de server zoals https://localhost/primary/store

En dit werkt prima… Maar ik wil de HTTP-server configureren zoals;

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

Als ik configureer zoals apache-server geeft 500 interne serverfout. Wat doe ik hier verkeerd?

De foutmelding die ik krijg is:

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [email protected] 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.

In het apache-foutlogboek staat;

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)

Hoe configureer ik de http-server om met de HTTPS-server te praten?


Antwoord 1, autoriteit 100%

Uw server vertelt u precies wat u nodig heeft: [Hint: SSLProxyEngine]

Je moet die richtlijn toevoegen aan je VirtualHostvóór de Proxyrichtlijnen:

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

Zie het document voor meer details.


Antwoord 2

In mijn geval was mijn server geconfigureerd om alleen in de https-modus te werken, en er trad een fout op wanneer ik toegang probeerde te krijgen tot de http-modus. Dus het veranderen van http://my-servicenaar https://my-servicehielp.

Other episodes