Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

virtual Host Problem

Status
Not open for further replies.

nandak7

Technical User
Sep 24, 2001
52
0
0
US
Hi All,

Configured virtual HOST by inserting this code in server.xml
My setup is webserver- Tomcat runs over windows 2000

</Host>
<!-- This Host is the first &quot;Virtual Host&quot;: -->
<Host name=&quot; appBase=&quot;webapps/basinit/Home&quot;>
<Context path=&quot;&quot; docBase=&quot;.&quot;/>
</Host>

I gave the rigt path in appbase.Now the problem is I have another web site running in the same server,which is default ie
When I say it always goes to
It seems to be it doesnt sees virtual host setting.I am using single static ip. I feel my dns is working good.
So how can I fix it.
Any help is appreciated
Nanda
 
Ok a quick scan on Google turned up the following:

From that document:
<Host name=&quot;mynewdomain0.com&quot; debug=&quot;0&quot; appBase=&quot;webapps&quot; unpackWARs=&quot;true&quot;>
<Logger className=&quot;org.apache.catalina.logger.FileLogger&quot;
directory=&quot;logs&quot; prefix=&quot;mynewdomain0.&quot; suffix=&quot;.log&quot; timestamp=&quot;true&quot;/>
<Context path=&quot;&quot; docBase=&quot;mynewdomain0&quot; debug=&quot;0&quot; reloadable=&quot;true&quot;/>
<Context path=&quot;/test&quot; docBase=&quot;mynewdomain0&quot; debug=&quot;0&quot; reloadable=&quot;true&quot;/>
</Host>
<Host name=&quot;mynextdomain1.com&quot; debug=&quot;0&quot; appBase=&quot;webapps&quot; unpackWARs=&quot;true&quot;>
<Logger className=&quot;org.apache.catalina.logger.FileLogger&quot;
directory=&quot;logs&quot; prefix=&quot;mynextdomain1.&quot; suffix=&quot;.log&quot; timestamp=&quot;true&quot;/>
<Context path=&quot;&quot; docBase=&quot;mynextdomain1&quot; debug=&quot;0&quot; reloadable=&quot;true&quot;/>
<Context path=&quot;/test&quot; docBase=&quot;mynextdomain1&quot; debug=&quot;0&quot; reloadable=&quot;true&quot;/>
</Host>

SEE THE FOLLOWING NOW!!!

Your problem with your example is with the you need to setup the ....

Handling www prefixes

If you try the ABOVE host examples with the you will be sadly disappointed. Instead of the expected content, you'll get the default context for the default host. Just like Apache, you need to define alias to handle the various permutations of each host name that you need to account for.

<Host name=&quot;mynewdomain0.com&quot; debug=&quot;0&quot; appBase=&quot;webapps&quot; unpackWARs=&quot;true&quot;>
<Alias> <Logger className=&quot;org.apache.catalina.logger.FileLogger&quot;
directory=&quot;logs&quot; prefix=&quot;mynewdomain0.&quot; suffix=&quot;.log&quot; timestamp=&quot;true&quot;/>
<Context path=&quot;&quot; docBase=&quot;mynewdomain0&quot; debug=&quot;0&quot; reloadable=&quot;true&quot;/>
<Context path=&quot;/test&quot; docBase=&quot;mynewdomain0&quot; debug=&quot;0&quot; reloadable=&quot;true&quot;/>
</Host>
<Host name=&quot;mynextdomain1.com&quot; debug=&quot;0&quot; appBase=&quot;webapps&quot; unpackWARs=&quot;true&quot;>
<Alias> <Logger className=&quot;org.apache.catalina.logger.FileLogger&quot;
directory=&quot;logs&quot; prefix=&quot;mynextdomain1.&quot; suffix=&quot;.log&quot; timestamp=&quot;true&quot;/>
<Context path=&quot;&quot; docBase=&quot;mynextdomain1&quot; debug=&quot;0&quot; reloadable=&quot;true&quot;/>
<Context path=&quot;/test&quot; docBase=&quot;mynextdomain1&quot; debug=&quot;0&quot; reloadable=&quot;true&quot;/>
</Host>


I hope that helps?

Regards to Lajos Moczar for the basis of the information.

Good Luck,
Laurie
 
Thanks Laurie.The above link has very good documentation.
I tried using above code with alias .But no luck.I have the same problem.I dont know where I am doing wrong.

Any help is appreciated.

Thanks
Nanda
 
Nanda, can you post your complete server.xml here so we can try and resolve your problem, I'm sure its something simple.

Laurie.
 
Hi Tarn,
Thanks for giving hope.Below is our server.xml file.My first domain name is 4westtexas.com (default) and my first virtual web site is basinit.com.I have single static ip and using name based virtual hosting.
Any help is appreciated.
Thanks
Nanda


<!-- Example Server Configuration File -->
<!-- Note that component elements are nested corresponding to their
parent-child relationships with each other -->

<!-- A &quot;Server&quot; is a singleton element that represents the entire JVM,
which may contain one or more &quot;Service&quot; instances. The Server
listens for a shutdown command on the indicated port.

Note: A &quot;Server&quot; is not itself a &quot;Container&quot;, so you may not
define subcomponents such as &quot;Valves&quot; or &quot;Loggers&quot; at this level.
-->

<Server port=&quot;8005&quot; shutdown=&quot;SHUTDOWN&quot; debug=&quot;0&quot;>


<!-- Uncomment these entries to enable JMX MBeans support -->
<Listener className=&quot;org.apache.catalina.mbeans.ServerLifecycleListener&quot;
debug=&quot;0&quot;/>
<Listener className=&quot;org.apache.catalina.mbeans.GlobalResourcesLifecycleListener&quot;
debug=&quot;0&quot;/>

<!-- Global JNDI resources -->
<GlobalNamingResources>

<!-- Test entry for demonstration purposes -->
<Environment name=&quot;simpleValue&quot; type=&quot;java.lang.Integer&quot; value=&quot;30&quot;/>

<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name=&quot;UserDatabase&quot; auth=&quot;Container&quot;
type=&quot;org.apache.catalina.UserDatabase&quot;
description=&quot;User database that can be updated and saved&quot;>
</Resource>
<ResourceParams name=&quot;UserDatabase&quot;>
<parameter>
<name>factory</name>
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
</parameter>
<parameter>
<name>pathname</name>
<value>conf/tomcat-users.xml</value>
</parameter>
</ResourceParams>

</GlobalNamingResources>

<!-- A &quot;Service&quot; is a collection of one or more &quot;Connectors&quot; that share
a single &quot;Container&quot; (and therefore the web applications visible
within that Container). Normally, that Container is an &quot;Engine&quot;,
but this is not required.

Note: A &quot;Service&quot; is not itself a &quot;Container&quot;, so you may not
define subcomponents such as &quot;Valves&quot; or &quot;Loggers&quot; at this level.
-->

<!-- Define the Tomcat Stand-Alone Service -->
<Service name=&quot;Tomcat-Standalone&quot;>

<!-- A &quot;Connector&quot; represents an endpoint by which requests are received
and responses are returned. Each Connector passes requests on to the
associated &quot;Container&quot; (normally an Engine) for processing.

By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
You can also enable an SSL HTTP/1.1 Connector on port 8443 by
following the instructions below and uncommenting the second Connector
entry. SSL support requires the following steps (see the SSL Config
HOWTO in the Tomcat 4.0 documentation bundle for more detailed
instructions):
* Download and install JSSE 1.0.2 or later, and put the JAR files
into &quot;$JAVA_HOME/jre/lib/ext&quot;.
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
with a password value of &quot;changeit&quot; for both the certificate and
the keystore itself.

By default, DNS lookups are enabled when a web application calls
request.getRemoteHost(). This can have an adverse impact on
performance, so you can disable it by setting the
&quot;enableLookups&quot; attribute to &quot;false&quot;. When DNS lookups are disabled,
request.getRemoteHost() will return the String version of the
IP address of the remote client.
-->

<!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8081 -->
<Connector className=&quot;org.apache.coyote.tomcat4.CoyoteConnector&quot;
port=&quot;80&quot; minProcessors=&quot;5&quot; maxProcessors=&quot;75&quot;
enableLookups=&quot;true&quot; redirectPort=&quot;8443&quot;
acceptCount=&quot;100&quot; debug=&quot;0&quot; connectionTimeout=&quot;20000&quot;
useURIValidationHack=&quot;false&quot; disableUploadTimeout=&quot;true&quot; />
<!-- Note : To disable connection timeouts, set connectionTimeout value
to -1 -->

<!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
<!--
<Connector className=&quot;org.apache.coyote.tomcat4.CoyoteConnector&quot;
port=&quot;8443&quot; minProcessors=&quot;5&quot; maxProcessors=&quot;75&quot;
enableLookups=&quot;true&quot;
acceptCount=&quot;100&quot; debug=&quot;0&quot; scheme=&quot;https&quot; secure=&quot;true&quot;
useURIValidationHack=&quot;false&quot; disableUploadTimeout=&quot;true&quot;>
<Factory className=&quot;org.apache.coyote.tomcat4.CoyoteServerSocketFactory&quot;
clientAuth=&quot;false&quot; protocol=&quot;TLS&quot; />
</Connector>
-->

<!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
<Connector className=&quot;org.apache.coyote.tomcat4.CoyoteConnector&quot;
port=&quot;8009&quot; minProcessors=&quot;5&quot; maxProcessors=&quot;75&quot;
enableLookups=&quot;true&quot; redirectPort=&quot;8443&quot;
acceptCount=&quot;10&quot; debug=&quot;0&quot; connectionTimeout=&quot;20000&quot;
useURIValidationHack=&quot;false&quot;
protocolHandlerClassName=&quot;org.apache.jk.server.JkCoyoteHandler&quot;/>

<!-- Define an AJP 1.3 Connector on port 8009 -->
<!--
<Connector className=&quot;org.apache.ajp.tomcat4.Ajp13Connector&quot;
port=&quot;8009&quot; minProcessors=&quot;5&quot; maxProcessors=&quot;75&quot;
acceptCount=&quot;10&quot; debug=&quot;0&quot;/>
-->

<!-- Define a Proxied HTTP/1.1 Connector on port 8082 -->
<!-- See proxy documentation for more information about using this. -->
<!--
<Connector className=&quot;org.apache.coyote.tomcat4.CoyoteConnector&quot;
port=&quot;8082&quot; minProcessors=&quot;5&quot; maxProcessors=&quot;75&quot;
enableLookups=&quot;true&quot; disableUploadTimeout=&quot;true&quot;
acceptCount=&quot;100&quot; debug=&quot;0&quot; connectionTimeout=&quot;20000&quot;
proxyPort=&quot;80&quot; useURIValidationHack=&quot;false&quot; />
-->

<!-- Define a non-SSL legacy HTTP/1.1 Test Connector on port 8083 -->
<!--
<Connector className=&quot;org.apache.catalina.connector.http.HttpConnector&quot;
port=&quot;8083&quot; minProcessors=&quot;5&quot; maxProcessors=&quot;75&quot;
enableLookups=&quot;true&quot; redirectPort=&quot;8443&quot;
acceptCount=&quot;10&quot; debug=&quot;0&quot; />
-->

<!-- Define a non-SSL HTTP/1.0 Test Connector on port 8084 -->
<!--
<Connector className=&quot;org.apache.catalina.connector.http10.HttpConnector&quot;
port=&quot;8084&quot; minProcessors=&quot;5&quot; maxProcessors=&quot;75&quot;
enableLookups=&quot;true&quot; redirectPort=&quot;8443&quot;
acceptCount=&quot;10&quot; debug=&quot;0&quot; />
-->

<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
on to the appropriate Host (virtual host). -->

<!-- Define the top level container in our container hierarchy -->
<Engine name=&quot;Standalone&quot; defaultHost=&quot;localhost&quot; debug=&quot;0&quot;>

<!-- The request dumper valve dumps useful debugging information about
the request headers and cookies that were received, and the response
headers and cookies that were sent, for all requests received by
this instance of Tomcat. If you care only about requests to a
particular virtual host, or a particular application, nest this
element inside the corresponding <Host> or <Context> entry instead.

For a similar mechanism that is portable to all Servlet 2.3
containers, check out the &quot;RequestDumperFilter&quot; Filter in the
example application (the source for this filter may be found in
&quot;$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters&quot;).

Request dumping is disabled by default. Uncomment the following
element to enable it. -->
<!--
<Valve className=&quot;org.apache.catalina.valves.RequestDumperValve&quot;/>
-->

<!-- Global logger unless overridden at lower levels -->
<Logger className=&quot;org.apache.catalina.logger.FileLogger&quot;
prefix=&quot;catalina_log.&quot; suffix=&quot;.txt&quot;
timestamp=&quot;true&quot;/>

<!-- Because this Realm is here, an instance will be shared globally -->

<!-- This Realm uses the UserDatabase configured in the global JNDI
resources under the key &quot;UserDatabase&quot;. Any edits
that are performed against this UserDatabase are immediately
available for use by the Realm. -->
<Realm className=&quot;org.apache.catalina.realm.UserDatabaseRealm&quot;
debug=&quot;0&quot; resourceName=&quot;UserDatabase&quot;/>

<!-- Comment out the old realm but leave here for now in case we
need to go back quickly -->
<!--
<Realm className=&quot;org.apache.catalina.realm.MemoryRealm&quot; />
-->

<!-- Replace the above Realm with one of the following to get a Realm
stored in a database and accessed via JDBC -->

<!--
<Realm className=&quot;org.apache.catalina.realm.JDBCRealm&quot; debug=&quot;99&quot;
driverName=&quot;org.gjt.mm.mysql.Driver&quot;
connectionURL=&quot;jdbc:mysql://localhost/authority&quot;
connectionName=&quot;test&quot; connectionPassword=&quot;test&quot;
userTable=&quot;users&quot; userNameCol=&quot;user_name&quot; userCredCol=&quot;user_pass&quot;
userRoleTable=&quot;user_roles&quot; roleNameCol=&quot;role_name&quot; />
-->

<!--
<Realm className=&quot;org.apache.catalina.realm.JDBCRealm&quot; debug=&quot;99&quot;
driverName=&quot;oracle.jdbc.driver.OracleDriver&quot;
connectionURL=&quot;jdbc:eek:racle:thin:mad:ntserver:1521:ORCL&quot;
connectionName=&quot;scott&quot; connectionPassword=&quot;tiger&quot;
userTable=&quot;users&quot; userNameCol=&quot;user_name&quot; userCredCol=&quot;user_pass&quot;
userRoleTable=&quot;user_roles&quot; roleNameCol=&quot;role_name&quot; />
-->

<!--
<Realm className=&quot;org.apache.catalina.realm.JDBCRealm&quot; debug=&quot;99&quot;
driverName=&quot;sun.jdbc.odbc.JdbcOdbcDriver&quot;
connectionURL=&quot;jdbc:eek:dbc:CATALINA&quot;
userTable=&quot;users&quot; userNameCol=&quot;user_name&quot; userCredCol=&quot;user_pass&quot;
userRoleTable=&quot;user_roles&quot; roleNameCol=&quot;role_name&quot; />
-->

<!-- Define the default virtual host -->
<Host name=&quot;localhost&quot; debug=&quot;0&quot; appBase=&quot;webapps&quot;
unpackWARs=&quot;true&quot; autoDeploy=&quot;true&quot;>


<!-- Normally, users must authenticate themselves to each web app
individually. Uncomment the following entry if you would like
a user to be authenticated the first time they encounter a
resource protected by a security constraint, and then have that
user identity maintained across *all* web applications contained
in this virtual host. -->
<!--
<Valve className=&quot;org.apache.catalina.authenticator.SingleSignOn&quot;
debug=&quot;0&quot;/>
-->

<!-- Access log processes all requests for this virtual host. By
default, log files are created in the &quot;logs&quot; directory relative to
$CATALINA_HOME. If you wish, you can specify a different
directory with the &quot;directory&quot; attribute. Specify either a relative
(to $CATALINA_HOME) or absolute path to the desired directory.
-->
<!--
<Valve className=&quot;org.apache.catalina.valves.AccessLogValve&quot;
directory=&quot;logs&quot; prefix=&quot;localhost_access_log.&quot; suffix=&quot;.txt&quot;
pattern=&quot;common&quot; resolveHosts=&quot;false&quot;/>
-->

<!-- Logger shared by all Contexts related to this virtual host. By
default (when using FileLogger), log files are created in the &quot;logs&quot;
directory relative to $CATALINA_HOME. If you wish, you can specify
a different directory with the &quot;directory&quot; attribute. Specify either a
relative (to $CATALINA_HOME) or absolute path to the desired
directory.-->
<Logger className=&quot;org.apache.catalina.logger.FileLogger&quot;
directory=&quot;logs&quot; prefix=&quot;localhost_log.&quot; suffix=&quot;.txt&quot;
timestamp=&quot;true&quot;/>

<!-- Define properties for each web application. This is only needed
if you want to set non-default properties, or have web application
document roots in places other than the virtual host's appBase
directory. -->
<DefaultContext reloadable=&quot;true&quot;/>

<!-- Tomcat Root Context -->
<!--
<Context path=&quot;&quot; docBase=&quot;ROOT&quot; debug=&quot;0&quot;/>
-->
<Context path=&quot;&quot; docBase=&quot;4WestTexas&quot; debug=&quot;0&quot;/>
<Context path=&quot;/testWestTexas&quot; docBase=&quot;testWestTexas&quot; debug=&quot;0&quot;/>
<Context path=&quot;/testgui&quot; docBase=&quot;testgui&quot; debug=&quot;0&quot;/>
<Context path=&quot;/ebttest&quot; docBase=&quot;ebttest&quot; debug=&quot;0&quot;/>

<!-- Tomcat Examples Context -->
<Context path=&quot;/examples&quot; docBase=&quot;examples&quot; debug=&quot;0&quot;
reloadable=&quot;true&quot; crossContext=&quot;true&quot;>
<Logger className=&quot;org.apache.catalina.logger.FileLogger&quot;
prefix=&quot;localhost_examples_log.&quot; suffix=&quot;.txt&quot;
timestamp=&quot;true&quot;/>
<Ejb name=&quot;ejb/EmplRecord&quot; type=&quot;Entity&quot;
home=&quot;com.wombat.empl.EmployeeRecordHome&quot;
remote=&quot;com.wombat.empl.EmployeeRecord&quot;/>

<!-- If you wanted the examples app to be able to edit the
user database, you would uncomment the following entry.
Of course, you would want to enable security on the
application as well, so this is not done by default!
The database object could be accessed like this:

Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup(&quot;java:comp/env&quot;);
UserDatabase database =
(UserDatabase) envCtx.lookup(&quot;userDatabase&quot;);
-->
<!--
<ResourceLink name=&quot;userDatabase&quot; global=&quot;UserDatabase&quot;
type=&quot;org.apache.catalina.UserDatabase&quot;/>
-->


<!-- PersistentManager: Uncomment the section below to test Persistent
Sessions.

saveOnRestart: If true, all active sessions will be saved
to the Store when Catalina is shutdown, regardless of
other settings. All Sessions found in the Store will be
loaded on startup. Sessions past their expiration are
ignored in both cases.
maxActiveSessions: If 0 or greater, having too many active
sessions will result in some being swapped out. minIdleSwap
limits this. -1 means unlimited sessions are allowed.
0 means sessions will almost always be swapped out after
use - this will be noticeably slow for your users.
minIdleSwap: Sessions must be idle for at least this long
(in seconds) before they will be swapped out due to
maxActiveSessions. This avoids thrashing when the site is
highly active. -1 or 0 means there is no minimum - sessions
can be swapped out at any time.
maxIdleSwap: Sessions will be swapped out if idle for this
long (in seconds). If minIdleSwap is higher, then it will
override this. This isn't exact: it is checked periodically.
-1 means sessions won't be swapped out for this reason,
although they may be swapped out for maxActiveSessions.
If set to >= 0, guarantees that all sessions found in the
Store will be loaded on startup.
maxIdleBackup: Sessions will be backed up (saved to the Store,
but left in active memory) if idle for this long (in seconds),
and all sessions found in the Store will be loaded on startup.
If set to -1 sessions will not be backed up, 0 means they
should be backed up shortly after being used.

To clear sessions from the Store, set maxActiveSessions, maxIdleSwap,
and minIdleBackup all to -1, saveOnRestart to false, then restart
Catalina.
-->
<!--
<Manager className=&quot;org.apache.catalina.session.PersistentManager&quot;
debug=&quot;0&quot;
saveOnRestart=&quot;true&quot;
maxActiveSessions=&quot;-1&quot;
minIdleSwap=&quot;-1&quot;
maxIdleSwap=&quot;-1&quot;
maxIdleBackup=&quot;-1&quot;>
<Store className=&quot;org.apache.catalina.session.FileStore&quot;/>
</Manager>
-->
<Environment name=&quot;maxExemptions&quot; type=&quot;java.lang.Integer&quot;
value=&quot;15&quot;/>
<Parameter name=&quot;context.param.name&quot; value=&quot;context.param.value&quot;
override=&quot;false&quot;/>
<Resource name=&quot;jdbc/EmployeeAppDb&quot; auth=&quot;SERVLET&quot;
type=&quot;javax.sql.DataSource&quot;/>
<ResourceParams name=&quot;jdbc/EmployeeAppDb&quot;>
<parameter><name>user</name><value>sa</value></parameter>
<parameter><name>password</name><value></value></parameter>
<parameter><name>driverClassName</name>
<value>org.hsql.jdbcDriver</value></parameter>
<parameter><name>driverName</name>
<value>jdbc:HypersonicSQL:database</value></parameter>
</ResourceParams>
<Resource name=&quot;mail/Session&quot; auth=&quot;Container&quot;
type=&quot;javax.mail.Session&quot;/>
<ResourceParams name=&quot;mail/Session&quot;>
<parameter>
<name>mail.smtp.host</name>
<value>localhost</value>
</parameter>
</ResourceParams>
<ResourceLink name=&quot;linkToGlobalResource&quot;
global=&quot;simpleValue&quot;
type=&quot;java.lang.Integer&quot;/>
</Context>

</Host>
<!-- This Host is the first &quot;Virtual Host&quot;: -->
<Host name=&quot; appBase=&quot;webapps/basinit/Home&quot;>
<Context path=&quot;&quot; docBase=&quot;.&quot;/>
</Host>

</Engine>

</Service>

<!-- The MOD_WEBAPP connector is used to connect Apache 1.3 with Tomcat 4.0
as its servlet container. Please read the README.txt file coming with
the WebApp Module distribution on how to build it.
(Or check out the &quot;jakarta-tomcat-connectors/webapp&quot; CVS repository)

To configure the Apache side, you must ensure that you have the
&quot;ServerName&quot; and &quot;Port&quot; directives defined in &quot;httpd.conf&quot;. Then,
lines like these to the bottom of your &quot;httpd.conf&quot; file:

LoadModule webapp_module libexec/mod_webapp.so
WebAppConnection warpConnection warp localhost:8008
WebAppDeploy examples warpConnection /examples/

The next time you restart Apache (after restarting Tomcat, if needed)
the connection will be established, and all applications you make
visible via &quot;WebAppDeploy&quot; directives can be accessed through Apache.
-->

<!-- Define an Apache-Connector Service -->
<!--
<Service name=&quot;Tomcat-Apache&quot;>

<Connector className=&quot;org.apache.catalina.connector.warp.WarpConnector&quot;
port=&quot;8008&quot; minProcessors=&quot;5&quot; maxProcessors=&quot;75&quot;
enableLookups=&quot;true&quot; appBase=&quot;webapps&quot;
acceptCount=&quot;10&quot; debug=&quot;0&quot;/>

<Engine className=&quot;org.apache.catalina.connector.warp.WarpEngine&quot;
name=&quot;Apache&quot; debug=&quot;0&quot;>

<Logger className=&quot;org.apache.catalina.logger.FileLogger&quot;
prefix=&quot;apache_log.&quot; suffix=&quot;.txt&quot;
timestamp=&quot;true&quot;/>

<Realm className=&quot;org.apache.catalina.realm.MemoryRealm&quot; />

</Engine>

</Service>
-->

</Server>
 
Ok things I see with a &quot;Quick&quot; look over are:

Lines 152 - 153
<!-- Define the top level container in our container hierarchy -->
<Engine name=&quot;Standalone&quot; defaultHost=&quot;localhost&quot; debug=&quot;0&quot;>

Ok so localhost is the default,

Then at:

Lines 222 - 224 ->
<!-- Define the default virtual host -->
<Host name=&quot;localhost&quot; debug=&quot;0&quot; appBase=&quot;webapps&quot;
unpackWARs=&quot;true&quot; autoDeploy=&quot;true&quot;>

It looks like &quot;this&quot; is your default host here, not sure but should this not be: <Host name=&quot;4westtexas.com&quot; .... and if you look back to my last posting you need to add the <Alias>www.4westtexas.com</Alias>; ????

Then again at :Lines 375 -381 ->

</Host>
<!-- This Host is the first &quot;Virtual Host&quot;: -->
<Host name=&quot; appBase=&quot;webapps/basinit/Home&quot;>
<Context path=&quot;&quot; docBase=&quot;.&quot;/>
</Host>

</Engine>


Again this &quot;probably&quot; should be:

<!-- This Host is the first &quot;Virtual Host&quot;: -->
<Host name=&quot;basinit.com&quot;; appBase=&quot;webapps/basinit/Home&quot;>
<Alias>www.basinit.com</Alias>;
<Context path=&quot;&quot; docBase=&quot;.&quot;/>
</Host>

</Engine>

This is not my area of skill so I stand to be corrected, tell me what you think?

Laurie.
 
Hi Laurie,

Still I have the same problem.I did all the changes as mentioned by you.But when I change my default localhost to my first domain name,Tomcat doesnt start.so I changed back to default localhost (lines 222-224).Also I tried other alternatives based on your suggestion. But no luck.Can you still look closer and figure out the problem with my server.xml file.

Any help is appreciated
Thanks
Nanda
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top