Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Trouble changing Tomcat webapps directory

Reply
Thread Tools

Trouble changing Tomcat webapps directory

 
 
laredotornado@zipmail.com
Guest
Posts: n/a
 
      11-03-2006
Hello,

I just instaleld 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

 
Reply With Quote
 
 
 
 
Simon Brooke
Guest
Posts: n/a
 
      11-03-2006
in message <(E-Mail Removed) .com>,
http://www.velocityreviews.com/forums/(E-Mail Removed) ('(E-Mail Removed)') wrote:

> Hello,
>
> I just instaleld 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?


Edit your hosts file and add the line

127.0.0.1 localhost

If you're using a UNIX-like system, this file is /etc/hosts; if you're
using a Microsoft system it's somewhere under System\Win32, I think. In
any case, it is called just 'hosts'.

--
(E-Mail Removed) (Simon Brooke) http://www.jasmine.org.uk/~simon/

Morning had broken, and there was nothing left for us to do
but pick up the pieces.
 
Reply With Quote
 
 
 
 
Steven J. Sobol
Guest
Posts: n/a
 
      11-03-2006
In article <(E-Mail Removed)>, Simon Brooke wrote:

> Edit your hosts file and add the line
>
> 127.0.0.1 localhost
>
> If you're using a UNIX-like system, this file is /etc/hosts; if you're
> using a Microsoft system it's somewhere under System\Win32, I think. In
> any case, it is called just 'hosts'.


On Windows:

c:\windows\system32\drivers\etc\hosts, except Windows NT and Windows 2000 Pro,
on those systems its c:\winnt\system32\drivers\etc\hosts


--
Steve Sobol, Professional Geek ** Java/VB/VC/PHP/Perl ** Linux/*BSD/Windows
Victorville, California PGP:0xE3AE35ED

It's all fun and games until someone starts a bonfire in the living room.
 
Reply With Quote
 
Simon Brooke
Guest
Posts: n/a
 
      11-03-2006
in message <(E-Mail Removed)>, Steven J. Sobol
('(E-Mail Removed)') wrote:

> In article <(E-Mail Removed)>, Simon
> Brooke wrote:
>
>> Edit your hosts file and add the line
>>
>> 127.0.0.1 localhost
>>
>> If you're using a UNIX-like system, this file is /etc/hosts; if you're
>> using a Microsoft system it's somewhere under System\Win32, I think. In
>> any case, it is called just 'hosts'.

>
> On Windows:
>
> c:\windows\system32\drivers\etc\hosts, except Windows NT and Windows 2000
> Pro, on those systems its c:\winnt\system32\drivers\etc\hosts


Thanks.

I think that demonstrates just how expert I am with Windows!

--
(E-Mail Removed) (Simon Brooke) http://www.jasmine.org.uk/~simon/

Hobbit ringleader gives Sauron One in the Eye.
 
Reply With Quote
 
Tor Iver Wilhelmsen
Guest
Posts: n/a
 
      11-04-2006
"Steven J. Sobol" <(E-Mail Removed)> writes:

> c:\windows\system32\drivers\etc\hosts, except Windows NT and Windows
> 2000 Pro, on those systems its c:\winnt\system32\drivers\etc\hosts


Whichever it is, it's available in the %windir% env variable.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple webapps under tomcat 5 WD Java 1 08-19-2005 01:07 PM
problem with nonlatin webapps on Tomcat 5 PaoloCastle Java 1 04-17-2005 11:02 AM
Tomcat 4.1.31 - huge count of webapps, Tomcat hangs up Martin Eberle Java 2 12-03-2004 07:10 PM
Configuring Tomcat to NOT use webapps directory Dean Rettig Java 2 12-29-2003 01:09 PM
tomcat cannot refresh my webapps charly Java 5 12-10-2003 05:55 AM



Advertisments