Spring Security 3:为 SSL 设置 tomcat 6

发布于 2024-12-27 19:54:57 字数 334 浏览 4 评论 0原文

我正在尝试设置在 tomcat 6 上运行的 spring security 3 以获取 SSL。

我需要测试与 https 的安全连接,我在 tomcat 上成功配置了 SSL,然后从生成的密钥库中导出了证书,但我的应用程序仍然无法运行。它将我重定向到端口 8443 上的 https,并显示“此网页不可用”。

<intercept-url pattern="/login" access="isAnonymous()" requires-channel="https"/>

有人可以告诉我还需要做什么来测试登录页面的安全连接吗?

I am trying to setup spring security 3 running on tomcat 6 for SSL.

I need to test a secure-connection with https for which I configured SSL on tomcat successfully and then exported a certificate out of generated keystore but still my application doesn't run. It redirects me to https on port 8443 and says that "This webpage is not available".

<intercept-url pattern="/login" access="isAnonymous()" requires-channel="https"/>

Could someone tell me what else do I need to do to test the secure connection for the login page?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

深海不蓝 2025-01-03 19:54:57

8443 是您的 Tomcat 实例的正确 HTTPS 端口吗?如果没有,您将需要在 spring security 中的 http 元素内进行端口映射:

<http>
    ...
    <port-mappings>
      <port-mapping http="9080" https="9443"/>
    </port-mappings>
</http>

Is 8443 the proper HTTPS port for your Tomcat instance? If not, you'll need a port-mapping inside your http element in spring security:

<http>
    ...
    <port-mappings>
      <port-mapping http="9080" https="9443"/>
    </port-mappings>
</http>
雨后咖啡店 2025-01-03 19:54:57
  1. 在 server.xml 中将 HTTP 端口更改为 80,将 HTTPS 更改为 433。
  2. 确保 Spring 上下文配置文件中没有任何端口映射。
  3. 重新启动 Tomcat。
  4. 将此答案标记为有用;)
  1. Change HTTP port to 80 and HTTPS to 433 in server.xml.
  2. Make sure you don't have any port mappings in your in the Spring context configuration file.
  3. Restart Tomcat.
  4. Mark this answer as useful ;)
錯遇了你 2025-01-03 19:54:57

似乎您必须配置 TOMCAT 才能使用 SSL(除了上面写的所有内容之外)

看看 此处

希望这有帮助...

哦哈德

seems like you have to configure your TOMCAT to work with SSL (in addition to all the things that are written above)

have a look here.

Hope this helps...

Ohad

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文