[Tomcat] local domain name access settings

Source: Internet
Author: User

Original path: localhost: 8080/tidyko

1. Remove the port 8080

Open % atat_home %/CONF/server. xml

Modify

<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>

Is

<Connector connectionTimeout="20000" port="80" protocol="HTTP/1.1" redirectPort="8443"/>

Now you can use localhost/tidyko to access the project.

2. Access by domain name/Project

Open % atat_home %/CONF/server. xml

Modify

<Engine defaultHost="localhost" name="Catalina">

Is

<Engine defaultHost="www.tidy.me" name="Catalina">

Modify

<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">

Is

<Host appBase="webapps" autoDeploy="true" name="www.tidy.me" unpackWARs="true">

Open C:/Windows/system32/Drivers/etc/hosts

Modify

127.0.0.1       localhost

Is

127.0.0.1       www.tidy.me

Now you can use www. Tidy. Me/tidyko to access the project.

3. Use a domain name to access a project

Open % atat_home %/CONF/server. xml

Modify

<Context docBase="tidy" path="/tidy" reloadable="true" source="org.eclipse.jst.jee.server:tidy"/>

Is

<Context docBase="tidy" path="" reloadable="true" source="org.eclipse.jst.jee.server:tidy"/>

Now you can use www. Tidy. me to access the project.

[Tomcat] local domain name access settings

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.