[Xitami] SSL on xitami Pro
Dave Cole
xitami@lists.xitami.org
Sat, 15 May 2004 09:24:32 -0500
This is a multi-part message in MIME format.
------=_NextPart_000_0038_01C43A5E.6E402190
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Thanks For all the answers and suggestions. This is the proceadure I have
decided on using.
I use php and not perl but the end result is the same.
-----Original Message-----
From: xitami-admin@lists.xitami.org
[mailto:xitami-admin@lists.xitami.org]On Behalf Of Robert Gilbertson
Sent: Saturday, May 15, 2004 7:52 AM
To: xitami@lists.xitami.org
Subject: Re: [Xitami] SSL on xitami Pro
An easy way would be to get your server script to find out if it is using
a secure connection, and if not, to feed your browser a simple page telling
it to load the secure one instead.
An example of how to do this using perl is as follows:
Insert the following line into your script, somewhere before the script
sends any info to the browser.
Immediately after any 'use' or require' statements is a good place.
If your secure port is not 443, change the number below.
#
if ($ENV{'SERVER_PORT'} ne '443') { &redirectsecure; }
#
now insert the following procedure into the script, changing
www.mysite.com to your own address (e.g.
https://www.thesite.com/cgi-bin/page.pl
#
print "Content-type: text/html\n\n";
print "This is the secure page";
sub redirectsecure {
print "Content-type: text/html\n\n";
print <<"EOF";
<html>
<head>
<script language="JavaScript">
window.location = "https://www.mysite.com";
</script>
</head>
<body>
</body>
</html>
EOF
exit;
}
#
----------------------------------------------------------------------------
--
----- Original Message -----
From: "Dave Cole" <dave@advancedzzz.com>
To: <xitami@lists.xitami.org>
Sent: Tuesday, May 11, 2004 9:35 PM
Subject: [Xitami] SSL on xitami Pro
> I have been a long time Xitami user, but now however I am at a impasse.
> Perhaps I am overlooking something.
> Here is my problem.
> I have purchased Xitami Pro and installed it as per the instructions.
> I have generated my private key and created a Temporary Untrusted
> Certificate.
> So far so Good.
> When I type the address in as follows https://mysite.com the security
works
> and the little lock icon lights up showing that I am using a secure
> connection.
> HOWEVER
> If I type http://mysite.com it still displays my wbsite in a non secure
> connection.
> How do I prevent this behavior?
> How do I force secure connections only?
> Thanks for answering.
>
>
>
>
>
> --
> Xitami Users Mailing List -- For Xitami support
> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
------=_NextPart_000_0038_01C43A5E.6E402190
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><SPAN class=3D096232214-15052004><FONT face=3DArial color=3D#0000ff =
size=3D2>Thanks=20
For all the answers and suggestions. This is the proceadure I have =
decided on=20
using.</FONT></SPAN></DIV>
<DIV><SPAN class=3D096232214-15052004><FONT face=3DArial color=3D#0000ff =
size=3D2>I use=20
php and not perl but the end result is the same.</FONT></SPAN></DIV>
<DIV><SPAN class=3D096232214-15052004><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<BLOCKQUOTE>
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B>=20
xitami-admin@lists.xitami.org =
[mailto:xitami-admin@lists.xitami.org]<B>On=20
Behalf Of </B>Robert Gilbertson<BR><B>Sent:</B> Saturday, May 15, 2004 =
7:52=20
AM<BR><B>To:</B> xitami@lists.xitami.org<BR><B>Subject:</B> Re: =
[Xitami] SSL=20
on xitami Pro<BR><BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>An easy way would be to get your =
server script to=20
find out if it is using a secure connection, and if not, to feed your =
browser=20
a simple page telling it to load the secure one instead.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>An example of how to do this using =
perl is as=20
follows:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Insert the following line into your =
script,=20
somewhere before the script sends any info to the =
browser.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Immediately after any 'use' or =
require'=20
statements is a good place.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>If your secure port is not 443, =
change the number=20
below.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>#<BR>if ($ENV{'SERVER_PORT'} ne =
'443') {=20
&redirectsecure; }<BR>#</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>now insert the following procedure =
into the=20
script, changing www.mysite.com to your own address (e.g.=20
https://www.thesite.com/cgi-bin/page.pl</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>#</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>print "Content-type: =
text/html\n\n";<BR>print=20
"This is the secure page";<BR>sub redirectsecure {<BR>print =
"Content-type:=20
text/html\n\n";<BR>print=20
<<"EOF";<BR><html><BR><head><BR><script=20
language=3D"JavaScript"><BR>window.location =3D=20
=
"https://www.mysite.com";<BR></script><BR></head><BR><body=
><BR></body><BR></html><BR>EOF<BR>exit;<BR>}</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>#</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>
<HR>
</DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>----- Original Message ----- </FONT>
<DIV><FONT face=3DArial size=3D2>From: "Dave Cole" <</FONT><A=20
href=3D"mailto:dave@advancedzzz.com"><FONT face=3DArial=20
size=3D2>dave@advancedzzz.com</FONT></A><FONT face=3DArial=20
size=3D2>></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>To: <</FONT><A=20
href=3D"mailto:xitami@lists.xitami.org"><FONT face=3DArial=20
size=3D2>xitami@lists.xitami.org</FONT></A><FONT face=3DArial=20
size=3D2>></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Sent: Tuesday, May 11, 2004 9:35 =
PM</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Subject: [Xitami] SSL on xitami=20
Pro</FONT></DIV></DIV>
<DIV><FONT face=3DArial><BR><FONT size=3D2></FONT></FONT></DIV><FONT =
face=3DArial=20
size=3D2>> I have been a long time Xitami user, but now however I =
am at a=20
impasse.<BR>> Perhaps I am overlooking something.<BR>> Here is =
my=20
problem.<BR>> I have purchased Xitami Pro and installed it as per =
the=20
instructions.<BR>> I have generated my private key and created a =
Temporary=20
Untrusted<BR>> Certificate.<BR>> So far so Good.<BR>> When I =
type the=20
address in as follows </FONT><A href=3D"https://mysite.com"><FONT =
face=3DArial=20
size=3D2>https://mysite.com</FONT></A><FONT face=3DArial size=3D2> the =
security=20
works<BR>> and the little lock icon lights up showing that I am =
using a=20
secure<BR>> connection.<BR>> HOWEVER<BR>> If I type </FONT><A =
href=3D"http://mysite.com"><FONT face=3DArial=20
size=3D2>http://mysite.com</FONT></A><FONT face=3DArial size=3D2> it =
still displays=20
my wbsite in a non secure<BR>> connection.<BR>> How do I prevent =
this=20
behavior?<BR>> How do I force secure connections only?<BR>> =
Thanks for=20
answering.<BR>> <BR>> <BR>> <BR>> <BR>> <BR>> =
--<BR>>=20
Xitami Users Mailing List -- For Xitami support<BR>> To =
unsubscribe:=20
</FONT><A =
href=3D"http://lists.xitami.org/mailman/listinfo/xitami"><FONT=20
face=3DArial =
size=3D2>http://lists.xitami.org/mailman/listinfo/xitami</FONT></A>=20
</BLOCKQUOTE></BODY></HTML>
------=_NextPart_000_0038_01C43A5E.6E402190--