You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "D. Alvarado" <la...@gmail.com> on 2006/11/03 21:01:14 UTC

Trouble changing Tomcat webapps directory

I just installed Tomcat 5.5 on Fedora Core 5 Linux.  Everything works
fine if I make absolutely no changes to anything, including server.xml
with this host element ...

      <Host name="localhost" appBase="webapps" unpackWARs="true"
autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false">

However, I want to change the default webapps directory.  I notice when
I change to any other directory (the one below exists and has 775
permissions)

      <Host name="localhost" appBase="/usr/local/apache2/htdocs"
unpackWARs="true" autoDeploy="true" xmlValidation="false"
xmlNamespaceAware="false">

I get this error by doing "wget" ...

[root@localhost bin]# wget http://localhost:8080/
--08:29:46--  http://localhost:8080/
           => `index.html'
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:8080... connected.
HTTP request sent, awaiting response... 400 No Host matches server name
localhost
08:29:46 ERROR 400: No Host matches server name localhost.

Any ideas where I might start troubleshooting the problem?

Thanks, - Dave

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


Re: Trouble changing Tomcat webapps directory

Posted by "D. Alvarado" <la...@gmail.com>.
Would a parse error be indicated on startup?  Anyway, I attached my
server.xml file, but here are the relevant lines

    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost">

      <!-- Define the default virtual host
           Note: XML Schema validation will not work with Xerces 2.2.
       -->
      <Host name="localhost" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">

Do these seem in order?

Thanks, - Dave


On 11/3/06, Caldarale, Charles R <Ch...@unisys.com> wrote:
> > From: D. Alvarado [mailto:laredotornado@gmail.com]
> > Subject: Trouble changing Tomcat webapps directory
> >
> > 08:29:46 ERROR 400: No Host matches server name localhost.
>
> This would indicate a mismatch between the defaultHost attribute in your
> <Engine> and the name attribute on your <Host>.  I wonder if you have
> some XML errors in your modified server.xml that prevent its being
> parsed properly.
>
>  - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> 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
>
>

RE: Trouble changing Tomcat webapps directory

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: D. Alvarado [mailto:laredotornado@gmail.com] 
> Subject: Trouble changing Tomcat webapps directory
> 
> 08:29:46 ERROR 400: No Host matches server name localhost.

This would indicate a mismatch between the defaultHost attribute in your
<Engine> and the name attribute on your <Host>.  I wonder if you have
some XML errors in your modified server.xml that prevent its being
parsed properly.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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