tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Burlison" <alan.burli...@gmail.com>
Subject Changing defaultHost from localhost to a FQDN
Date Thu, 26 Oct 2006 22:47:45 GMT
I'm sure this must be a FAQ, but I can't find the answer anywhere.  I
have a simple standalone tomcat install that works just fine, but as
soon as I change the Engine defaultHost and Host name fields from
"localhost" to "myhost.com", everything stops working.  As well as
changing the entries in server.xml I also renamed the localhost
directory in the Catalina directory to "myhost.com", but although the
server starts OK and I get no errors in the log files, any attempt to
access the application gets a 404 - including the standard tomcat
manager app.  I notice there are localhost lines in logging.properties
- do I need to change them as well?  I find the logging.properties
documentation to be pretty much impenetrable, to be frank.

Here's my server.xml.  In case anyone wonders, the port=80 isn't the
problem, the tomcat user has been given permissions to access that
port, and it worked fine on port 80 before I changed the hostname from
localhost.  Any and all suggestions (including RTFMs)  gratefully
received - I'm at my wits end with this!

----------
<Server port="8005" shutdown="SHUTDOWN">
  <!-- Used by Manager webapp -->
  <GlobalNamingResources>
    <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="80" />
    <Engine name="Catalina" defaultHost="myhost.com">
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
             resourceName="UserDatabase" />
      <Host name="myhost.com" appBase="webapps" />
    </Engine>
  </Service>
</Server>
----------

-- 
Alan Burlison
--

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message