服务器 Gind.cn

服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器

Apache上的永久redirect不起作用

我在Windows 2008上有一个Apache 2.4服务器,作为一个反向代理工作得很好。 它提供在Glassfish 3.0上运行的LifeRay 6.0安装的内容。 最初,当我们实施https永久性redirect时,我们不能再loginLifeRay,但是现在我已经解决了这个问题。 一旦我们login到Liferay,连接是安全的,但仍然可以将https更改为http,页面将显示为http连接,而不会恢复为https。 而且,到站点的初始连接可以使用http,如果用户没有login,站点将继续使用http连接。 再次,我虽然redirect永久会强制所有HTTPstream量为https。 Apache向用户提供SSL连接,proxypass指令在不安全的端口上连接到LifeRay,这不是问题,因为内部连接是虚拟的,不能从Internet访问。 所以,我虽然有configuration钉在这个,但我必须失去一些东西,因为我似乎能够访问该网站与http时,我认为永久redirect会阻止。 ProxyPassReverse应该是https而不是http? 这是configuration: testing服务器 <VirtualHost *:443> ServerName test.myexternalserver.org # ProxyPreserveHost On SetEnv proxy-sendchunked SSLEngine on ProxyPass / http://192.168.80.196:8080/ ProxyPassReverse / http://192.168.80.196:8080/ </VirtualHost> <VirtualHost *:80> ServerName test.myexternalserver.org ProxyPreserveHost On SetEnv proxy-sendchunked Redirect permanent / https://test.myexternalserver.org/ ProxyPass / http://192.168.80.196:8080/ ProxyPassReverse / http://192.168.80.196:8080/ </VirtualHost>