tomcat server.xml elements in the host

Test accidental discovery:

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

<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />

<Context path="/aa" docBase="/usr/tomcat/webapps_aaa/aaa" debug="0" reloadable="true"/>

</Host>

If the host name here if configured as a domain name www.aaa.com, then use the corresponding ip will not be accessible, if need ip to access, you need to change the ip host name attribute to.

You need to use the ip access in exceptional circumstances, and then could not find the range, then the host name can be used to change ip ip visit.

 

Guess you like

Origin www.cnblogs.com/digdeep/p/11320300.html