tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parsons Technical Services" <parsonstechni...@earthlink.net>
Subject Re: "No Host matches server name localhost" error
Date Tue, 30 Aug 2005 17:10:04 GMT
Per the 5.5 doc you can't do it that way. You can only specify the path as a 
blank string when the context element is in the server.xml.

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html

Look at the path attribute.

Doug


----- Original Message ----- 
From: "Brian Moseley" <bcm@maz.org>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Sent: Tuesday, August 30, 2005 12:50 PM
Subject: "No Host matches server name localhost" error


>
> 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
>
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message