I've got a web app running on a local tomcat.
It works if I go to http://localhost:9095.
I'm wanting it to also work if I go to http://localhost.a5007.droot.net:9095.
I tried adding an alias in the server.xml but it hasn't worked.
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener"></Listener>
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"></Listener>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"></Listener>
<Listener className="org.apache.catalina.storeconfig.StoreConfigLifecycleListener"></Listener>
<GlobalNamingResources>
<Environment name="simpleValue" type="java.lang.Integer" value="30"></Environment>
<Resource name="UserDatabase" auth="Container" type="org.apache.catalina.UserDatabase" description="User database that can be开发者_如何转开发 updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" pathname="conf/tomcat-users.xml"></Resource>
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="${tomcat.port}" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="${tomcat.ssl.port}" acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true"></Connector>
<Connector port="8009" enableLookups="false" redirectPort="${tomcat.ssl.port}" protocol="AJP/1.3"></Connector>
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" driverName="${authentication.database.driver}" connectionURL="${authentication.database.url}" userTable="users" userNameCol="user_name" userCredCol="user_pass" userRoleTable="user_roles" roleNameCol="role_name"></Realm>
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">
<Alias>localhost.a5007.droot.net</Alias>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="${caplin.logs.dir}/tomcat" prefix="localhost_access_log." suffix=".txt" pattern="common" resolveHosts="false"></Valve>
</Host>
</Engine>
</Service>
</Server>
I can ping localhost.a5007.droot.net from the command line.
Pinging localhost.a5007.droot.net [127.0.0.1] with 32 bytes of data: Reply from 127.0.0.1: bytes=32 time<1ms TTL=128 Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
Any suggestions?
精彩评论