我有一个带有DIY盒式磁带的OpenShift实例,我个人配置了Apache Tomcat。这是我的server.xml
:
<?xml version='1.0' encoding='utf-8'?>
<Server port="15005" shutdown="SHUTDOWN" address="OPENSHIFT_DEV_IP">
<Listener className="org.apache.catalina.security.SecurityListener" />
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener" />
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
<GlobalNamingResources>
<Resource name="jdbc_ttDS" auth="Container"
type="javax.sql.DataSource"
driverClassName="org.h2.Driver"
url="jdbc:h2:ssutt;INIT=RUNSCRIPT FROM './initTT.sql'"
username="####"
password="####"
maxActive="20"
maxIdle="5"
maxWait="-1"
description="SSU TT database"
/>
<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" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
address="OPENSHIFT_DEV_IP"
redirectPort="15443" />
<Connector port="15009" protocol="AJP/1.3" redirectPort="8443" address="OPENSHIFT_DEV_IP"/>
<Engine name="Catalina" defaultHost="OPENSHIFT_DEV_IP">
<Realm className="org.apache.catalina.realm.LockOutRealm">
<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key "UserDatabase". Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
</Realm>
<Host name="backend-ssutt.rhcloud.com" 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 "%r" %s %b" />
</Host>
</Engine>
</Service>
</Server>
我可以通过backend-ssutt.rhcloud.com
访问它。没关系。奇怪的是,我无法通过api.ssutt.org
等其他地址访问它,但我添加了别名和DNS CNAME记录。
奇怪的是,它正在使用默认的Tomcat 7 / EWS盒式磁带。如何配置Tomcat或我的DNS记录,以便通过其他地址访问。