我正在尝试通过另一台具有 tomcat 服务器的服务器路由 https 流量。之前我只是使用 http,并且运行良好。
我的会议记录如下
<VirtualHost *:443>
ProxyRequests on
ProxyPass / http://127.0.0.1:80/
ProxyPassReverse / http://127.0.0.1:80/
ProxyPreserveHost On
SSLEngine on
ServerName support.address.co.uk
SSLCertificateFile /etc/httpd/conf/support_address_co_uk.crt
SSLCertificateKeyFile /etc/httpd/conf/support.address.co.uk.key
</VirtualHost>
<VirtualHost *:80>
ProxyRequests on
ProxyPass / balancer://myBalancer/ stickysession=JSESSIONID scolonpathdelim=On
ProxyPassReverse / balancer://myBalancer/
<Proxy balancer://myBalancer >
BalancerMember http://tomcat:90 route=tomcatA loadfactor=100
</Proxy>
RewriteEngine On
RewriteCond %{SERVER_NAME} ^(.*)$
RewriteRule ^(.*)$ - [E=SERVER_NAME:%1,NS]
RewriteCond %{SERVER_PORT} ^(.*)$
RewriteRule ^(.*)$ - [E=SERVER_PORT:%1,NS]
RequestHeader set X-Remote-Address "%{SERVER_NAME}e:%{SERVER_PORT}e"
</VirtualHost>
如果我尝试这样做,它只会将流量从 https 更改为 http,并在我通过登录页面后继续使用 http。我该如何更改它以便在返回后保留 https?
我尝试放入另一条重写规则并收到许多重定向的错误。
干杯。