Apache 역방향 프록시에서 404 오류 발생

Apache 역방향 프록시에서 404 오류 발생

Apache 역방향 프록시 서버를 설정했습니다. 일반적으로 그것은 작동하고 해야 할 일을 수행합니다. 하지만 이제는 외부 URL에 대한 요청을 프록시로 지정하고 싶습니다. URL에 대한 wget이 작동하는 동안 프록시는 계속해서 404를 제공합니다.

ssl.conf 캡처:

<VirtualHost 10.*.*.*:7006>
    ErrorLog logs/ssl_error_log
    TransferLog logs/ssl_access_log
    LogLevel warn
    ServerName ***********

[...]

    ProxyPreserveHost On
    ProxyPass / https://10.*.*.*:7002/
    ProxyPassReverse / https://10.*.*.*:7002/

    #New
            ProxyPass /test https://correct.url
            ProxyPassReverse /test https://correct.url

wget 명령이 올바르게 작동합니다.

wget https://correct.url --2018-02-19 17:43:59-- https://correct.url Resolving correct.url... 10.*.*.* Connecting to correct.url|10.*.*.*|:443... connected. HTTP request sent, awaiting response... 401 Unauthorized Authorization failed.

ProxyPreserveHost를 Off로 설정하려고 했지만 아무런 효과가 없었습니다.

답변1

ProxyPass /test 위에 ProxyPass / 지시어를 배치해야 합니다. 지시문은 첫 번째 일치 순서대로 평가되므로 구성에서 /test에 대한 모든 요청은 /에 대해 정의된 프록시에 의해 처리됩니다.

관련 정보