You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by David Salbego <ds...@anl.gov> on 2003/06/10 23:25:22 UTC

Apache, Tomcat/JBoss, SSL, redirection

Hello All,

New to the list, did some searching in the archives and didn't see an answer offhand but I may have missed it (my apologies!)

Config:

Server: HP-UX_Apache-based_Web_Server/2.0.45 (Unix) mod_perl/1.99_08 Perl/v5.6.1 PHP/4.2.3 mod_ssl/2.0.45 OpenSSL/0.9.6i DAV/2 mod_jk/1.2.0

The above is from the Apache web server running on the HP-UX machine we are doing the development on.  

I have integrated Apache, mod_jk, Tomcat 4.1, and JBoss 3.0.7 together and they run fine.  I did not compile anything; HP supplies a pre-configured suite of products (Apache and Tomcat, among others); I simply installed JBoss 3.0.7 (w/ Tomcat) and pointed JBoss to use HP's pre-installed Tomcat instead of its own.  
Test applications show the whole deal is working, but we have problems when we attempt to use SSL.

In a nutshell, it appears mod_jk is the culprit:  when going to a JkMount'd directory (and not supplying a filename in the URL), mod_jk appears to redirect the web client to the wrong location (everything is correct except the _protocol_, i.e. http is returned instead of https)

Example:

https://www.myserver.com/testapp/index.jsp

works fine.

https://www.myserver.com/testapp/

redirects to:

http://www.myserver.com:443/testapp/index.jsp

and the above returns the standard "You are talking plain HTTP to
an SSL-enabled web server... " error.

Logs from mod_jk:

>[Fri Jun 06 15:02:00 2003]  [jk_uri_worker_map.c (502)]: jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 -> /testapp/
>[Fri Jun 06 15:02:01 2003]  [jk_uri_worker_map.c (477)]: Attempting to map URI '/testapp/'
>[Fri Jun 06 15:02:01 2003]  [jk_uri_worker_map.c (502)]: jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 -> /testapp/
>[Fri Jun 06 15:02:01 2003]  [jk_ajp_common.c (532)]: ajp_unmarshal_response: Header[0] [Location] = [http://www.myserver.com:443/testapp/index.jsp]
>

I can supply any needed config files but I didn't want to include them in this initial email.

Is the problem I'm seeing due to the way the programs were compiled and packaged by HP?  The HP admin would highly prefer to use these pre-packaged solutions as opposed to compiling from source, although we can do that if we have to.

Has anyone else seen this problem?

Please CC: me directly as well as I have this list filtered into a mailbox I cannot read every day.

Thanks for your help,

--Dave


----
David Salbego  (dsalbego@anl.gov)
Unix Infrastructure Group Manager
Computing and Instrumentation Solutions
Argonne National Laboratory
Phone: +1 630.252.7837  Fax: +1 630.252.9689 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Apache, Tomcat/JBoss, SSL, redirection

Posted by Nikola Milutinovic <Ni...@ev.co.yu>.
> As I have not received any hints, is there a better list I should be posting this type of question to?
>  Like I said, I think the question is reasonable but I might be overlooking something completely obvious.

Don't give up on us :-)

The error you describe is strange, I've read it just now and I'm puzzled. Could you try to eliminate mod_jk from the picture?

Run a normal Coyote HTTPS on port 8083 and try the same thing. The redirection is Tomcat's job and maybe it is getting wrong info from mod_jk.

Nix.


Re: Apache, Tomcat/JBoss, SSL, redirection

Posted by David Salbego <ds...@anl.gov>.
As I have not received any hints, is there a better list I should be posting this type of question to?  Like I said, I think the question is reasonable but I might be overlooking something completely obvious.  

thanks again for your assistance,

--Dave

At 04:25 PM 6/10/2003, David Salbego wrote:
>Hello All,
>
>New to the list, did some searching in the archives and didn't see an answer offhand but I may have missed it (my apologies!)
>
>Config:
>
>Server: HP-UX_Apache-based_Web_Server/2.0.45 (Unix) mod_perl/1.99_08 Perl/v5.6.1 PHP/4.2.3 mod_ssl/2.0.45 OpenSSL/0.9.6i DAV/2 mod_jk/1.2.0
>
>The above is from the Apache web server running on the HP-UX machine we are doing the development on.  
>
>I have integrated Apache, mod_jk, Tomcat 4.1, and JBoss 3.0.7 together and they run fine.  I did not compile anything; HP supplies a pre-configured suite of products (Apache and Tomcat, among others); I simply installed JBoss 3.0.7 (w/ Tomcat) and pointed JBoss to use HP's pre-installed Tomcat instead of its own.  
>Test applications show the whole deal is working, but we have problems when we attempt to use SSL.
>
>In a nutshell, it appears mod_jk is the culprit:  when going to a JkMount'd directory (and not supplying a filename in the URL), mod_jk appears to redirect the web client to the wrong location (everything is correct except the _protocol_, i.e. http is returned instead of https)
>
>Example:
>
>https://www.myserver.com/testapp/index.jsp
>
>works fine.
>
>https://www.myserver.com/testapp/
>
>redirects to:
>
>http://www.myserver.com:443/testapp/index.jsp
>
>and the above returns the standard "You are talking plain HTTP to
>an SSL-enabled web server... " error.
>
>Logs from mod_jk:
>
>>[Fri Jun 06 15:02:00 2003]  [jk_uri_worker_map.c (502)]: jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 -> /testapp/
>>[Fri Jun 06 15:02:01 2003]  [jk_uri_worker_map.c (477)]: Attempting to map URI '/testapp/'
>>[Fri Jun 06 15:02:01 2003]  [jk_uri_worker_map.c (502)]: jk_uri_worker_map_t::map_uri_to_worker, Found a context match ajp13 -> /testapp/
>>[Fri Jun 06 15:02:01 2003]  [jk_ajp_common.c (532)]: ajp_unmarshal_response: Header[0] [Location] = [http://www.myserver.com:443/testapp/index.jsp]
>>
>
>I can supply any needed config files but I didn't want to include them in this initial email.
>
>Is the problem I'm seeing due to the way the programs were compiled and packaged by HP?  The HP admin would highly prefer to use these pre-packaged solutions as opposed to compiling from source, although we can do that if we have to.
>
>Has anyone else seen this problem?
>
>Please CC: me directly as well as I have this list filtered into a mailbox I cannot read every day.
>
>Thanks for your help,
>
>--Dave
>
>
>----
>David Salbego  (dsalbego@anl.gov)
>Unix Infrastructure Group Manager
>Computing and Instrumentation Solutions
>Argonne National Laboratory
>Phone: +1 630.252.7837  Fax: +1 630.252.9689 
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

----
David Salbego  (dsalbego@anl.gov)
Unix Infrastructure Group Manager
Computing and Instrumentation Solutions
Argonne National Laboratory
Phone: +1 630.252.7837  Fax: +1 630.252.9689 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org