tomcat7.0.55 Configuring HTTP Force jump to HTTPS

Source: Internet
Author: User

First you need to configure HTTPS one-way or two-way links

Reference:

tomcat7.0.55 Configuring one-way and two-way HTTPS connections (two)

Then edit the Web. XML under Tomcat's CONF directory

Add after <welcome-file-list> end tag

    <Login-config>        <!--Authorization setting for SSL -        <Auth-method>Client-cert</Auth-method>        <Realm-name>Client Cert users-only Area</Realm-name>    </Login-config>    <Security-constraint>        <!--Authorization setting for SSL -        <web-resource-collection>            <Web-resource-name>Ssl</Web-resource-name>            <Url-pattern>/*</Url-pattern>        </web-resource-collection>        <User-data-constraint>            <Transport-guarantee>Confidential</Transport-guarantee>        </User-data-constraint>    </Security-constraint>

As shown

Then reboot Tomcat and open it in a browser

http://localhost:8080

The address bar can see the https://localhost:8443/instructions successfully configured

tomcat7.0.55 Configuring HTTP Force jump to HTTPS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.