You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2" <jo...@navy.mil> on 2011/07/22 16:54:11 UTC
Web app running on http, not on https
Before I copy and paste any configs (such as httpd.conf and httpd-ssl.conf), let me throw this out there and see if you guys can at least point me in the right direction.
Environment
===========
Apache 2.2.19, installed with mod_jk (latest connector) and mod_ssl (enabled with Apache's compile).
Tomcat 6.0.32, running on port 8081.
Apache is listening on port 80 (for non-SSL) and on port 443 (for SSL).
I've got a web app on Tomcat. We'll call it "myWebApp".
I've got the needed certificate for SSL, verified to be working properly.
I've got mod_jk, workers.properties, etc., set up to route calls to Tomcat. In other words, "http://localhost/myWebApp" properly pulls up myWebApp, without me needing to specify Tomcat port 8081. Although if I go to "http://localhost:8081/myWebApp", it works the same way. Obviously, mod_jk is doing its job.
Problem
=======
Here's where it gets lost on me...
If I type "http://localhost", I get the expected "It works!" Apache page. Cool.
If I type "https://localhost", I get the expected "It works!" Apache page. Cool.
If I type "http://localhost/myWebApp", I get the expected result of my web app coming up. Cool.
If I type "https://localhost/myWebApp", I get an unexpected 404 error: "Not Found. The requested URL /myWebApp was not found on this server." NOT COOL!
I think I'm probably missing something small (in terms of effort, not impact). I'll be happy to send any logs or config files, if need be. I just wanted to see if someone could tell at first blush, before I go through the trouble of copying each log or conf file.
Thanks in advance.
Jonathan
P.S. Thanks to all who advised me on compiling Apache and mod_jk. Worked great!
RE: Web app running on http, not on https
Posted by "Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2" <jo...@navy.mil>.
That was it, Mark. It's all good now!
You da man! :-)
Jonathan
-----Original Message-----
From: Mark Thomas [mailto:markt@apache.org]
Sent: Friday, July 22, 2011 11:59 AM
To: Tomcat Users List
Subject: Re: Web app running on http, not on https
On 22/07/2011 15:54, Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2 wrote:
> If I type "https://localhost/myWebApp", I get an unexpected 404
> error: "Not Found. The requested URL /myWebApp was not found on this
> server." NOT COOL!
At a guess, you have forgotten that mod_jk config is *per virtual host*
and haven't configured the SSL virtual host. See JkMountCopy in the docs.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Web app running on http, not on https
Posted by Mark Thomas <ma...@apache.org>.
On 22/07/2011 15:54, Leffingwell, Jonathan R CTR FRCSE, JAX 7.2.2 wrote:
> If I type "https://localhost/myWebApp", I get an unexpected 404
> error: "Not Found. The requested URL /myWebApp was not found on this
> server." NOT COOL!
At a guess, you have forgotten that mod_jk config is *per virtual host*
and haven't configured the SSL virtual host. See JkMountCopy in the docs.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Web app running on http, not on https
Posted by chris derham <ch...@derham.me.uk>.
> If I type "http://localhost", I get the expected "It works!" Apache page.
> Cool.
>
Apache works on port 80
>
> If I type "https://localhost", I get the expected "It works!" Apache page.
> Cool.
>
Apache works on port 443
>
> If I type "http://localhost/myWebApp", I get the expected result of my web
> app coming up. Cool.
>
Apache forwarding to tomcat on port 80
>
> If I type "https://localhost/myWebApp", I get an unexpected 404 error:
> "Not Found. The requested URL /myWebApp was not found on this server." NOT
> COOL!
>
Apache not forwarding to tomcat on port 443
We'd need to see the relevant config where you forward to tomcat to help any
further
Chris