在Windows中的端口443上运行Tomcat7

时间:2015-01-14 18:09:55

标签: java security tomcat https tomcat7

在https模式下,默认情况下Tomcat在端口8443中运行,由于这个原因,端口号必须包含在URL中。例如:https://www.xyzdomain.com:8443/login

为了摆脱URL中的端口号,我想我需要在443运行Tomcat。这是我的 server.xml

的片段
<!-- A "Connector" represents an endpoint by which requests are received
     and responses are returned. Documentation at :
     Java HTTP Connector: /docs/config/http.html (blocking & non-blocking)
     Java AJP  Connector: /docs/config/ajp.html
     APR (HTTP/AJP) Connector: /docs/apr.html
     Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port="80" protocol="HTTP/1.1"
           connectionTimeout="20000"
           redirectPort="8443" />

<!-- Define a SSL HTTP/1.1 Connector on port 8443
     This connector uses the BIO implementation that requires the JSSE
     style configuration. When using the APR/native implementation, the
     OpenSSL style configuration is required as described in the APR/native
     documentation -->

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
           maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
           redirectPort="443" clientAuth="false" sslProtocol="TLS" keystoreFile="C:\Users\certificate\www_abc_com.jks" keystorePass="password" />

我尝试过很多东西,包括跟随server.xml,但无法让tomcat在Windows上的443端口运行。

  1. 将第一个连接器端口从8443更改为443。
  2. 添加了redirectPort = 443
  3. 添加了另一个编号为443的连接器端口。
  4. 有些人建议以root身份启动tomcat(我右键单击并以管理员身份运行start.bat文件)。有人建议在IP表中添加重定向,但我在Windows上。

0 个答案:

没有答案