aspose file tools*
The moose likes Tomcat and the fly likes Weird result of server.xml for Virtual Host Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Weird result of server.xml for Virtual Host" Watch "Weird result of server.xml for Virtual Host" New topic
Author

Weird result of server.xml for Virtual Host

Chriz Yuen
Greenhorn

Joined: Jan 23, 2006
Posts: 1
1. http://mainhost/ >> at IP-a
2. http://virtualhost/ >> at same IP as above.

It is strange that http://mainhost/virtualhost/ could be display as case 2.
Even virtualhost is not subfolder of mainhost.
Below is my server.xml.

<Server port="8005" shutdown="SHUTDOWN" debug="0">
<Service name="Tomcat-Standalone">
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="443" minProcessors="5" maxProcessors="75" enableLookups="true"
acceptCount="10" debug="0" scheme="https" secure="true">
<Factory className="org.apache.catalina.net.SSLServerSocketFactory"
clientAuth="false" protocol="TLS" keystorePass="xxxx"/>
</Connector>
<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="80" minProcessors="5" maxProcessors="75"
enableLookups="true" redirectPort="8443"
acceptCount="10" debug="0" connectionTimeout="60000"> </Connector>
<Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
port="8009" minProcessors="5" maxProcessors="75"
acceptCount="10" debug="0"/>
<Engine name="Standalone" defaultHost="mainhost" debug="0">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="catalina_log." suffix=".txt"
timestamp="true"/>
<Realm className="org.apache.catalina.realm.MemoryRealm" />
<Host name="mainhost" debug="0" appBase="webapps" unpackWARs="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="mainhost_access_log." suffix=".txt" pattern="common"$
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="mainhost_log." suffix=".txt"
timestamp="true"/>
<Context path="" docBase="mainhost" debug="0"/>
</Host>
<Host name="virtualhost" debug="0" appBase="webapps" unpackWARs="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" prefix="virtualhost_access_log." suffix=".txt" pattern="$
<Logger className="org.apache.catalina.logger.FileLogger" directory="logs" prefix="virtualhost_log." suffix=".txt" timestamp="true"/>
<Context path="" docBase="virtualhost" debug="0"/>
</Host>
</Engine>
</Service>
</Server>
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
If this was my problem I would try giving a complete absolute path for the appBase parameter.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Weird result of server.xml for Virtual Host