当 Apache Web 服务器使用 mod_jk 连接 Tomcat 时启用 SSL
我有 /usr/local/tomcat/webapps/cas
,我的 java 应用程序正在其中运行。 连接 Tomcat 和 Apache Web 服务器(httpd)后,当我尝试 http://192.168.0.117/cas
时,我可以看到登录页面,但是当我尝试 https://192.168.0.117/ 时cas
我从 Apache Web 服务器而不是 Tomcat 收到 404 not found
。
<代码> 未找到
在此服务器上找不到请求的 URL /cas。
Apache/2.2.3 (CentOS) 服务器位于 192.168.0.117 端口 443
Apache Web 服务器应答的 https://192.168.0.117/
效果很好。
所以我认为应该通过配置 Apache Web 服务器将某些请求转发到 tomcat 来解决该问题。 互联网上有一些帮助,但没有分步指南。
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 443
https://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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我猜您正在使用 Apache Tomcat 连接器来连接 Apache 和 Tomcat。尝试在 Apache 中找到配置 SSL 的位置,例如通过
grep -R SSLEngine *
。然后尝试放置 Apache Tomcat 连接器配置文件/etc/apache2/mods-enabled/jk.load
的行,这些行负责应受保护的连接(例如JkMount /idp worker1
)位于 SSL 配置文件的
中。对于 Ubuntu 或 Debian,这可能是/etc/apache2/sites-available/default-ssl
文件。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 (sayJkMount /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.