tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Cook <bc...@printtime.com>
Subject Re: "No Host matches server name localhost" error
Date Tue, 30 Aug 2005 16:59:55 GMT


The error your getting is more likely saying that you computer can not 
resolve localhost as domain name.  If so it would have nothing to do 
with your server config.  Try using the loop back IP(127.0.0.1).  If 
this is happening on a windows box you may want to run a check for 
viruses or spyware.  If it is Linux make sure you have a listing for 
localhost in your /etc/hosts file.


Brian Moseley wrote:
> 
> i'm using tomcat 5.5.9 with a single webapp deployed with a context path 
> of "" and a default host named "localhost". when i request the webapp's 
> root resource (http://localhost:8080/), i get a 400 error with the 
> message "No Host matches server name localhost".
> 
> as you can see from my very minimal server.xml, i do in fact have a Host 
> named localhost and have specified it as the default host for the 
> engine. so, i must admit to being confused as to why i'm receiving that 
> particular error message. :) i have turned on debug logging to verify 
> that the context is being loaded, but i have yet to step through a 
> request with a debugger. any ideas?
> 
> server.xml:
> 
> <Server port="8005" shutdown="SHUTDOWN">
>   <Service name="Catalina">
>     <Connector port="8080" enableLookups="false"/>
>     <Engine name="Catalina" defaultHost="localhost">
>       <Host name="localhost" appBase="webapps" autoDeploy="false"/>
>     </Engine>
>   </Service>
> </Server>
> 
> context.xml (in conf/Catalina/localhost/):
> 
> <Context path="" docBase="cosmo" reloadable="true">
>   <Environment name="cosmo/version" value="0.2-4"
>                type="java.lang.String" override="false"/>
>   <Environment name="cosmo/serverAdmin" value="bcm@osafoundation.org"
>                type="java.lang.String" override="false"/>
>   <Environment name="cosmo/repository/username"
>                value="cosmo_repository"
>                type="java.lang.String" override="false"/>
>   <Environment name="cosmo/repository/password"
>                value=""
>                type="java.lang.String" override="false"/>
>   <Resource name="jcr/cosmo"
>             type="javax.jcr.Repository"
> 
> factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
>             configFilePath="etc/repository.xml"
>             repHomeDir="data/repository"/>
>   <Resource name="jdbc/cosmo"
>             type="javax.sql.DataSource"
>             maxActive="5"
>             maxIdle="3"
>             maxWait="10000"
>             username="sa"
>             parameter=""
>             driverClassName="org.hsqldb.jdbcDriver"
>             url="jdbc:hsqldb:file:data/db/userdb"/>
>   <Resource name="mail/cosmo"
>             type="javax.mail.Session"
>             mail.transport.protocol="smtp"/>
>             mail.smtp.host="localhost"/>
>             mail.smtps.host="localhost"/>
>             mail.smtp.starttls.enable="false"/>
>   <Valve className="org.apache.catalina.valves.AccessLogValve"
>          directory="../logs" prefix="access." suffix=".log"
>          pattern="combined" resolveHosts="false"/>
> </Context>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
Brian Cook
Digital Services Analyst
Print Time Inc.
bcook@printtime.com
913.345.8900


Mime
View raw message