У меня возникла проблема с настройкой обратного прокси-сервера Apache.
Я хочу использовать URL-адрес: https://software.testsite.net, и мой обратный прокси должен быть настроен с использованием http://localhost:82/customapp.
Проблема в настоящее время, когда я перехожу к https://www.testsite.net, она заменяется на http://localhost:82/customapp.
Как мне настроить это?
Моя конфигурация:
<VirtualHost *:443>
SSLEngine on
ServerName software.testsite.net
SSLProxyEngine On
SSLCertificateFile "${SRVROOT}/certs/testsite.crt"
SSLCertificateKeyFile "${SRVROOT}/certs/testsite.key"
SSLCertificateChainFile "${SRVROOT}/certs/testsite.ca-bundle"
RequestHeader edit Destination ^https http early
<Location />
RedirectMatch ^/$ https://localhost:82/customapp
ProxyPass http://localhost:82/customapp
ProxyPassReverse http://localhost:82/customapp
</Location>
</virtualhost>
<VirtualHost *:80>
ProxyPreserveHost On
ProxyVia on
RewriteEngine on
ProxyRequests Off
SSLProxyEngine On
SSLCertificateFile "${SRVROOT}/certs/testsite.crt"
SSLCertificateKeyFile "${SRVROOT}/certs/testsite.key"
SSLCertificateChainFile "${SRVROOT}/certs/testsite.ca-bundle"
# used for enforcing http to https
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{SERVER_NAME}$1 [R,L]
ServerName software.testsite.net
<Location />
ProxyPass http://localhost:82/customapp
ProxyPassReverse http://localhost:82/customapp
</Location>
</VirtualHost>