一,tomcat Host的属性autoDeploy 为true自动部署的情况
注:unpackWARs="true"
appBase
.appBase
.unpackWARs
attribute set to "false", in which case the web application will be simply redeployed as a compressed archive.$CATALINA_BASE/conf/[enginename]/[hostname]/
directory.$CATALINA_BASE/conf/[enginename]/[hostname]/
directory.的webapp
二,tomcat6多域名绑定
In many server environments, Network Administrators have configured more than one network name (in the Domain
Name Service (DNS) server), that resolve to the IP address of the same server. Normally, each such network
name would be configured as a separate Host element in conf/server.xml, each with its own set of web
applications.
However, in some circumstances, it is desireable that two or more network names should resolve to the same
virtual host, running the same set of applications. A common use case for this scenario is a corporate web
site, where it is desireable that users be able to utilize either www.mycompany.com or company.com to access
exactly the same content and applications.
This is accomplished by utilizing one or more Alias elements nested inside your Host element. For example:
<Host name="www.mycompany.com" ...>
...
<Alias>mycompany.com</Alias>
...
</Host>
In order for this strategy to be effective, all of the network names involved must be registered in your DNS
server to resolve to the same computer that is running this in、
三,设置允许和禁用ip,domain
You can ask Catalina to check the IP address, or host name, on every incoming request directed to the surrounding Engine, Host, or Context element. The remote address or name will be checked against a configured list of "accept" and/or "deny" filters, which are defined using the Regular Expression syntax supported by the Jakarta Regexp regular expression library. Requests that come from locations that are not accepted will be rejected with an HTTP "Forbidden" error. Example filter declarations:
<Engine name="Standalone" ...> ... <Valve className="org.apache.catalina.valves.RemoteHostValve" allow="*.mycompany.com,www.yourcompany.com"/> <Valve className="org.apache.catalina.valves.RemoteAddrValve" deny="192.168.1.*"/> ... </Engine> |