Trouble changing Tomcat webapps directory

Discussion in 'Java' started by laredotornado@zipmail.com, Nov 3, 2006.

  1. Guest

    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
     
    , Nov 3, 2006
    #1
    1. Advertising

  2. Simon Brooke Guest

    in message <>,
    ('') 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'.

    --
    (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.
     
    Simon Brooke, Nov 3, 2006
    #2
    1. Advertising

  3. In article <>, 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.
     
    Steven J. Sobol, Nov 3, 2006
    #3
  4. Simon Brooke Guest

    in message <>, Steven J. Sobol
    ('') wrote:

    > In article <>, 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!

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

    Hobbit ringleader gives Sauron One in the Eye.
     
    Simon Brooke, Nov 3, 2006
    #4
  5. "Steven J. Sobol" <> 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. :)
     
    Tor Iver Wilhelmsen, Nov 4, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. charly
    Replies:
    5
    Views:
    1,806
  2. Dean Rettig
    Replies:
    2
    Views:
    5,470
    X_AWemner_X
    Dec 29, 2003
  3. Martin Eberle
    Replies:
    2
    Views:
    839
  4. PaoloCastle
    Replies:
    1
    Views:
    368
    PaoloCastle
    Apr 17, 2005
  5. WD
    Replies:
    1
    Views:
    1,973
    Raymond DeCampo
    Aug 19, 2005
Loading...

Share This Page