-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul,

On 11/28/12 6:29 PM, Paul van Hoven wrote:
> Thanks for your quick and detailed answers. Actually I think I did
> all the things you mentioned but it still does not work. So here
> are the changes I made:
> 
> 1. I checked that the following entries are in the engine tag: 
> <Server port="8005" shutdown="SHUTDOWN"> ... <Service
> name="Catalina"> ... <Engine name="Catalina"
> defaultHost="localhost"> <Host name="localhost"  appBase="webapps" 
> unpackWARs="true" autoDeploy="true"> <Host
> name="www.my2nddomain.com" 
> appBase="/opt/apache-tomcat-7.0.32/my2nddomain" unpackWARs="true" 
> autoDeploy="true" xmlValidation="false" xmlNamespaceAware="false"> 
> </Host> </Engine> </Service> </Server>

This looks correct to me.

> 2. In the host file I altered the entries to 88.84.140.85
> www.my2nddomain.com 88.84.140.85      www.my1rstdomain.com

Is this on the server or the client? Or both?

Go to the machine you are using as an HTTP client (e.g. web browser)
and type this on the command line:

nslookup www.my2nddomain.com

You should get 88.84.140.85 back.

Next, you need to make sure that the client is sending a "Host" header
with the HTTP message. The Host header is required for HTTP/1.1, so if
the client is not specifying the Host, it is non-compliant.

Tomcat can't determine the virtual host to use if the Host header is
absent. If the Host header is absent or the value of Host does not
match anything Tomcat has configured, the default Host for the Engine
will be used. In your case, it's the "localhost" host.

> The current status is that when calling www.my1rstdomain.com:8080 
> points to the webapp installed for www.my2nddomain.com:8080.

That seems very odd, since you don't have any configuration for
www.my1rstdomain.com, so you should get the default. What happens when
you request www.my2nddomain.com?

Can you post an HTTP protocol trace of a request/response?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlC35rMACgkQ9CaO5/Lv0PBg7wCfbZ5FAYwfrCQfx0vb1KjB3j/2
QxwAnjFvdrNhV+XhxQ+ttDDpOiaJtp3d
=EUkh
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to