Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Weird result of server.xml for Virtual Host

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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=""
clientAuth="false" protocol="TLS" keystorePass="xxxx"/>
<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"
<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"
<Context path="" docBase="mainhost" debug="0"/>
<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"/>
Author and all-around good cowpoke
Posts: 13078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If this was my problem I would try giving a complete absolute path for the appBase parameter.
Let nothing stop you! Not even this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!