Actually I want to force the https access of my context

1. I included ssl.conf in httpd.conf.

2. In ssl.conf, I enabled SSL and

<VirtualHost _default_:*>
        ServerName my.domain.com:443
        ......
</VirtualHost>

3. In my server.xml, the only connector loaded is a secure one.

<Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
                port="8009" ...... redirectPort="8443"
                scheme="https" secure="true"
                ....../>

I assume any http request will be automatically redirected as https to 8443.
However, if I type http://my.domain.com/mycontext, apache gave me a "bad
Request" page.

Bad Request
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.


Hint: https://my.domain.com/


Am I totally wrong? Any thought besides RedirectPermanent and the above
no-user-friendly remind?


Regards,
 
 
PQ
 
"This Guy Thinks He Knows Everything"
"This Guy Thinks He Knows What He Is Doing"

-----Original Message-----
From: Mohamed Nasser [mailto:[EMAIL PROTECTED]] 
Sent: February 11, 2003 4:23 PM
To: Tomcat Users List
Subject: RE: automatically redirect http to https in tomcat

In the httpd.conf under the virtual host listening to port 80 have the line
RedirectPermanent / https://my.domain.com 
if you want it to do for specific content you may have to play with the
above statement or redirect rules. The above would be for all http requests.
-MN

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tue, February 11, 2003 4:12 PM
To: [EMAIL PROTECTED]
Subject: automatically redirect http to https in tomcat


Is it possible to automatically redirect any http request to https in an
Apache + Tomcat environment? For example, If I enter
http://my.domain.com/mycontext <http://my.domain.com/mycontext> , I would be
automatically redirected to https://my.domain.com/mycontext?

 

Regards,

 

 

 

PQ

 

"This Guy Thinks He Knows Everything"

"This Guy Thinks He Knows What He Is Doing"

 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to