Trouble changing Tomcat webapps directory

L

laredotornado

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
 
S

Simon Brooke

in message <[email protected]>,
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'.
 
S

Steven J. Sobol

Simon Brooke wrote: said:
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
 
S

Simon Brooke

Steven J. Sobol said:
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!
 
T

Tor Iver Wilhelmsen

Steven J. Sobol said:
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. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top