>> If I point my browser to http://www.mydomain.com 
>> <http://www.mydomain.com> , Apache redirects me to 
>> http://123.45.67.89/index.jsp <http://123.45.67.89/index.jsp> , where 
>> 123.45.67.89 is the IP address of the server running the application, 
>> and is set as the ServerName in httpd.conf.

> And what is strange here? Apache recognized www.mydomain.com as an alias
fo a sort and issued a redirect to what he considered to be the real URL.

What is strange here is that this did not happen before I upgraded to
mod_webapp. Also, when you have many domain names pointing to the same IP
address, you do not want all of them to be redirected. For example, if a
user inputs http://www.mydomain2.com in his browser address window, we dont
want the address to be changed to 123.45.67.89.

>> If I change the ServerName in httpd.conf to www.mydomain.com 
>> <http://www.mydomain.com> , then the opposite happens (that is, if I 
>> point the browser to 123.45.67.89 I get redirected to 
>> www.mydomain.com/index.jsp <http://www.mydomain.com/index.jsp> ).

> Yup.

Here I am showing that this problem is directly connected to the value of
the ServerName. It seems that mod_webapp redirects all requests to the
ServerName.

>> Now the strange thing is, that if I type the full path (with the 
>> "/index.jsp" at the end), then no redirection occurs.

> Of course not. If you type http://www.mydomain.com/ you shouldn't see
redirection. You're getting redirected because of that last slash in the URL
and it is normal for Apache and web servers in general.

That's where you are wrong my friend...again. A slash at the end IS NOT
SUFFICIENT. I have to type THE FULL PATH to not be redirected.

>> This is a problem for me because I have multiple domain names pointing 
>> to the IP address, and the user is always redirected to the IP 
>> address, which is unacceptable.

> And have you defined multiple VirtualHost-s? Of course you haven't. Read
Apache docs on Virtual Hosts.

> Nix.

Once again, you are wrong. I have tried defining VirtualHosts, and that
worked partly, but that is not an acceptable solution for me. Let me explain
why. My webapp displays different content depending on the hostname, and one
of the requirements for the webapp is that when more domain names are added
(all pointing to the same IP address), no configuration or restart should
have to be done in Apache or Tomcat. You should just have to tell the webapp
to recognize it.

OGG

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to