> 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.
> 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.
> 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.
> 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.