Redirect http to https: Difference between revisions

(removing spam)
No edit summary
 
(14 intermediate revisions by 6 users not shown)
Line 1: Line 1:
Modify the file: /opt/zimbra/tomcat/webapps/zimbra/public/Login.jsp<br>
{{Archive}}{{Article Infobox|{{admin}}|||{{ZCS 4.5}}}}NOTE: 5.0+ has a [[zmtlsctl]] redirect mode.
so that you change all occurrences of:<br>
<br>
initMode=" + currentProto<br>
to<br>
'''initMode=https"'''<br>
<br>
Only 3-5 lines will need to be changed in all. Below is an example of 3 lines (112, 113, 123) you will need to change<br>
----
org line  112> qs = emptyQs? "?initMode=" + currentProto: qs + "&initMode=" +<br>
org line  113> currentProto;<br>
new line 112> qs = emptyQs? "?initMode=https": qs + "&initMode=https";<br>
new line 113>


org line 123> qs = emptyQs? "?initMode=" + currentProto: qs + "&initMode=" + currentProto;<br>
This will allow initial connections over http, but '''always''' redirect them to https. If you just want to force authentication to occur over https, just use ''[[zmtlsctl]] mixed''.
new line 123> qs = emptyQs? "?initMode=https": qs + "&initMode=https";<br>
 
----
==Edit Login.jsp==
 
This prevents the server from redirecting back to http if the initial connection is http.
 
On each mailbox node, in the file '''/opt/zimbra/tomcat/webapps/zimbra/public/Login.jsp''', comment out this statement:
 
  qs = emptyQs? "?initMode=" + currentProto: qs + "&initMode=" +
currentProto;
 
In other words, make it look like this:
 
//qs = emptyQs? "?initMode=" + currentProto: qs + "&initMode=" +
//currentProto;
 
==Set mixed mode==
 
This configures the server to accept both http and https connections.
 
su - zimbra
zmtlsctl mixed
tomcat restart
 
''Note that this is an attempt at a workaround for the problem addressed in [http://bugzilla.zimbra.com/show_bug.cgi?id=7631 Bug 7631], which is scheduled to be fixed in ZCS 5.0.
 
{{Article Footer|ZCS 4.5|6/15/2006}}
 
[[Category:Administration]]
[[Category:ZCS 4.5]]

Latest revision as of 17:23, 24 March 2015

Admin Article

Article Information

This article applies to the following ZCS versions.

ZCS 4.5 Article ZCS 4.5

NOTE: 5.0+ has a zmtlsctl redirect mode.

This will allow initial connections over http, but always redirect them to https. If you just want to force authentication to occur over https, just use zmtlsctl mixed.

Edit Login.jsp

This prevents the server from redirecting back to http if the initial connection is http.

On each mailbox node, in the file /opt/zimbra/tomcat/webapps/zimbra/public/Login.jsp, comment out this statement:

qs = emptyQs? "?initMode=" + currentProto: qs + "&initMode=" +
currentProto;

In other words, make it look like this:

//qs = emptyQs? "?initMode=" + currentProto: qs + "&initMode=" +
//currentProto;

Set mixed mode

This configures the server to accept both http and https connections.

su - zimbra
zmtlsctl mixed
tomcat restart

Note that this is an attempt at a workaround for the problem addressed in Bug 7631, which is scheduled to be fixed in ZCS 5.0.

Verified Against: ZCS 4.5 Date Created: 6/15/2006
Article ID: https://wiki.zimbra.com/index.php?title=Redirect_http_to_https Date Modified: 2015-03-24



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search