Actually, I took it a step further: I wanted to be sure that anyone who
goes to http: gets redirected. With just a simple redirection page, someone
could still go http://oursite/ourapp and get by without using SSL.
Here's what I did:
1. added a new Service with the http connector (port 80) and a single app
with 1 page (index.html) and web.xml.
2. The index.html redirects them to https:
3. Snippets of code from server.xml:
<Service name="Tomcat-(Redirector)">
<Connector className="org.apache.catalina.connector.http.HttpConnector"
address="x.x.x.x" port="80" {remainder removed for ease}/>
<Engine name="Redirector" defaultHost="localhost">
<Host name="localhost" debug="4" appBase="webapps"
unpackWARs="true">
<Context path="" docBase="e:/staging/wwwroot/Redirector"
reloadable="false"/>
</Host>
</Engine>
</Service>
<Service name="Tomcat-(Staging)">
<Connector className="org.apache.catalina.connector.http.HttpConnector"
address="x.x.x.x" port="443" {remainder removed}>
<Factory className="org.apache.catalina.net.SSLServerSocketFactory"
{remaining SSL Factory stuff}/>
</Connector>
<Engine name="Standalone" defaultHost="localhost">
... remainder of server.xml ...
Thanks,
John
-----Original Message-----
From: Richard S. Huntrods [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 07, 2002 3:38 PM
To: [EMAIL PROTECTED]
Subject: RE: Redirect port 80 requests to 443
John Roth said:
====
This seems simple, but ...
I am running Tomcat 4.0.3, standalone on w2k. I would like all requests
to
http://oursite/ to be automatically redirected to https://oursite/ but
am
not finding an elegant/simple solution. Below is a snippet from
server.xml:
====
Why not simply create a web page that automatically redirects the
request to the https page? That is what I did and it works fine.
-Richard
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>