Open the file conf/server.xml and find this line: <Engine name="Catalina" defaultHost="localhost">
Add your desired site below:
<Host name=”a.demo.com” appBase=”webapps” unpackWARs=”true” autoDeploy=”true” xmlValidation=”false” xmlNamespaceAware=”false”>
<Context path=”” docBase=”D:demo” workDir=”D:demowork”></Context>
<Alias>a.demo.cn</Alias>
</Host>
Set the paths of docBase and workDir here according to your actual situation. docBase is the path of the website program, workDir is the path of the cache file, the value of name is the website domain name, and the value of Alias is similar to name, and is also bound to the domain name in the directory.