问题
I have /usr/local/tomcat/webapps/cas
, where my java app is running.
after interfacing Tomcat and Apache web server(httpd) when I try http://192.168.0.117/cas
I can see Login page, but when I try https://192.168.0.117/cas
I got 404 not found
from Apache web server not from Tomcat.
Not Found
The requested URL /cas was not found on this server.
Apache/2.2.3 (CentOS) Server at 192.168.0.117 Port 443https://192.168.0.117/
that answered by Apache web server works well.
so I think the problem should solve by configuring Apache web server to forward some request to tomcat.
there is some helps on internet but there isn't a step by step guideline.
回答1:
I guess you are using the Apache Tomcat Connector to connect Apache and Tomcat. Try to find the place in Apache where your SSL is configured, for example by a grep -R SSLEngine *
. Then try to place the lines of the Apache Tomcat Connector configuration file /etc/apache2/mods-enabled/jk.load
which are responsible for the connection that should be protected (say JkMount /idp worker1
) inside the <VirtualHost>
of the SSL configuration file. For Ubuntu or Debian, this may be the /etc/apache2/sites-available/default-ssl
file.
来源:https://stackoverflow.com/questions/4695026/enabling-ssl-when-tomcat-is-interfaced-by-apache-web-server-using-mod-jk