Redirect 从非ssl端口8080重定向到ssl端口8443
我试图将非SSL端口8080上的流量重定向到SSL端口8443(在Jboss 4.2.3.GA版本上),但它不起作用。当我在这个端口上访问我的Web应用程序时,它会停留在那个端口上,页面就会显示出来。这是我在server.xml文件中的配置Redirect 从非ssl端口8080重定向到ssl端口8443,redirect,ssl,jboss,Redirect,Ssl,Jboss,我试图将非SSL端口8080上的流量重定向到SSL端口8443(在Jboss 4.2.3.GA版本上),但它不起作用。当我在这个端口上访问我的Web应用程序时,它会停留在那个端口上,页面就会显示出来。这是我在server.xml文件中的配置 <Connector port="8080" address="${jboss.bind.address}" maxThreads="250" maxHttpHeaderSize="8192" emptySessionPat
<Connector port="8080" address="${jboss.bind.address}"
maxThreads="250" maxHttpHeaderSize="8192"
emptySessionPath="true" protocol="HTTP/1.1"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"/>
<!-- Define a SSL HTTP/1.1 Connector on port 8443
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
described in the APR documentation -->
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS" keystoreFile="conf/sds/keystore"/>
下面是web.xml配置
<security-constraint>
<web-resource-collection>
<web-resource-name>SUCTR</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
苏克特
/*
保密的
我尝试过使用默认端口80和443,也尝试过在url模式中使用特定路径,但仍然不起作用。我不知道我做错了什么,你能给我指出正确的方向吗
谢谢。看起来不错。我假设您正在关闭安全约束标记。尝试将url模式更改为“/APP\u URI/*”,并查看它在访问应用程序时是否有所不同。在web.xml中编辑
<security-constraint>
<web-resource-collection>
<web-resource-name>App_nmae</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
应用程序
/*
得到
邮递
保密的
在sever.xml中编辑
<Connector port="443" protocol="HTTP/1.1" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="/opt/apache-tomcat-6.0.13/.keystore"
keystorePass="changeit"/>
它对我有用。你可以试试它。解释了这个过程。端口号是否可能保持不变,只有它重定向到https?端口号是否可能保持不变,只有它重定向到https?