0

我有以下配置,它总是将 URL 返回为“https:\sysaid.external.comlogin.jsp”,在“ https://sysaid.external.com ”和“login.jsp”之间没有“/” 。

#REDIRECT for http://sysaid.external.com
<VirtualHost *:80>
        ServerName sysaid.external.com
        ProxyPreserveHost On
        Redirect / https://sysaid.external.com
</VirtualHost>

#https://sysaid.external.com
<VirtualHost *:443>
        ServerAdmin webmaster@external.com
        ServerName sysaid.external.com
        SSLEngine on
        SSLCertificateFile    /usr/local/etc/apache22/ssl/webmail.external.com.crt
        SSLCertificateKeyFile /usr/local/etc/apache22/ssl/webmail.external.com.key
        ProxyPreserveHost On
        ProxyPass / http://srv-01.internal.local:80/
        ProxyPassReverse / http://srv-01.internal.local:80/
        ProxyPassReverse / http://sysaid.external.com:80/
</VirtualHost>

虽然这个在没有 SSL 重定向的情况下可以正常工作......

#http://sysaid.external.com
<VirtualHost *:80>
    ServerAdmin webmaster@external.com
    ServerName sysaid.external.com
    ProxyRequests Off
    ProxyPreserveHost On
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>

    ProxyPass / http://srv-01.internal.local:80/
    ProxyPassReverse / http://srv-01.internal.local:80/
    <Location />
        Order allow,deny
        Allow from all
    </Location>
</VirtualHost>

我还有其他人使用 SSL 重定向,它们都可以正常工作。

从代理服务器从 telnet 到 Web 服务器进行测试,我得到以下信息:

root@core-rp-01:/home/user # telnet srv-01.internal.local 80
Trying 172.34.0.10...
Connected to srv-01.internal.local.
Escape character is '^]'.
GET / HTTP/1.1
Host: sysaid.external.com

HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Set-Cookie: JSESSIONID=F5FA5C04242A51536916C688A23077F1; Path=/; HttpOnly
Location: http://sysaid.external.com/Login.jsp
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 0
Date: Fri, 09 Aug 2013 15:16:06 GMT

想法?

谢谢!

4

1 回答 1

0

解决了:

#REDIRECT for http://sysaid.external.com
<VirtualHost *:80>
        ServerName sysaid.external.com
        ProxyPreserveHost On
        Redirect / https://sysaid.external.com
</VirtualHost>

#https://sysaid.external.com
<VirtualHost *:443>
        ServerAdmin webmaster@external.com
        ServerName sysaid.external.com
        SSLEngine on
        SSLCertificateFile    /usr/local/etc/apache22/ssl/webmail.external.com.crt
        SSLCertificateKeyFile /usr/local/etc/apache22/ssl/webmail.external.com.key
        ProxyPreserveHost On
        ProxyPass / http://srv-01.internal.local/
        ProxyPassReverse / http://srv-01.internal.local/
        ProxyPassReverse / http://sysaid.external.com/
</VirtualHost>
于 2013-08-12T13:14:49.043 回答