Can I run Tomcat securely on port 443 and insecurely on 8080(我可以在端口 443 上安全地运行 Tomcat 而在 8080 上不安全地运行 Tomcat)
问题描述
让我解释一下我的情况.
Let me explain my situation.
目前,我有很多应用程序在 Tomcat 6 上运行,默认端口为 8080.
Currently, I have a lot of applications running on Tomcat 6, on the default port 8080.
我刚刚创建了一些需要登录的应用程序.我将购买 SSL 证书以安装在此服务器上.
I just created some applications that will need a log in. I'm going to buy an SSL certificate to install on this server.
我不喜欢使用端口 8443 的想法,因为它会使 URL 更加复杂.如果我在 80 端口上运行 Tomcat,我必须更改几十个链接,并且我必须以 root 身份运行 Tomcat(而不是 tomcat).
I don't like the idea of using port 8443 because it makes the URL more complicated. If I run Tomcat on port 80, I'd have to change dozens of links and I'd have to run Tomcat as root ( rather than tomcat ).
在端口 8080 上运行不安全的应用程序但在端口 443 上运行安全应用程序是否有任何问题?
Is there any problem running the insecure applications on port 8080 but having the secure run on port 443?
我想象我的设置会有如下所示的 URL:
I'm imagining my setup will have URLs that look like this:
http://mydomain.com:8080/report/controller?id=weather
https://mydomain.com/secure/controller?id=profile
这可能吗?
推荐答案
是的,完全没问题.只需将连接器配置为使用相应的端口即可.但是对于 443,我猜也需要 root.
Yes, it's perfectly OK. Just configure the connectors to use the respective ports. But for 443 I'd guess root would be required as well.
这篇关于我可以在端口 443 上安全地运行 Tomcat 而在 8080 上不安全地运行 Tomcat的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:我可以在端口 443 上安全地运行 Tomcat 而在 8080 上不安全地运行 Tomcat


基础教程推荐
- Java 实例变量在两个语句中声明和初始化 2022-01-01
- Java Swing计时器未清除 2022-01-01
- 不推荐使用 Api 注释的描述 2022-01-01
- 验证是否调用了所有 getter 方法 2022-01-01
- 多个组件的复杂布局 2022-01-01
- 大摇大摆的枚举 2022-01-01
- 如何在 JFrame 中覆盖 windowsClosing 事件 2022-01-01
- 在 Java 中创建日期的正确方法是什么? 2022-01-01
- 从 python 访问 JVM 2022-01-01
- 如何在 Spring @Value 注解中正确指定默认值? 2022-01-01