This may not help you, but NameVirtualHost 1.2.3.4 says that you want
to use that IP for name based virtual hosts.  However, you've got a
Serveralias 1.2.3.4 which means that you want this IP also respond to
your VirtualHost (i.g. you are really trying to do a IP based
virtualhost).  You don't need the NameVirtualHost line, nor do you
need the ServerAlias 1.2.3.4 line if you are only hosting on site on
1.2.3.4.

--Victor

On 5/6/07, akhayyami <[EMAIL PROTECTED]> wrote:

  I have a problem with one of my servers; When I enter
http://www.myserver.com in address bar (IE & Firefox), apache replaces the
server name (e.g. www.myserver.com) with an ip address. I tried with &
without virtual hosts but no chance. I also tried UseCanonicalName with yes
& no. How can I disable this?
This is my virtualhost config:

NameVirtualHost 1.2.3.4:80

<VirtualHost 1.2.3.4:80>
        ServerName www.myserver.com
        UseCanonicalName Off
        ServerAlias myserver.com
        ServerAlias 1.2.3.4
        CustomLog     /etc/httpd/logs/myserver-access.log combined
        ErrorLog      /etc/httpd/logs/myserver-error.log
        LogLevel info
        DocumentRoot /home/tomcat/webapps
        DirectoryIndex index.html index.htm index.shtml index.jsp
        JkAutoAlias /home/tomcat/webapps

        JkMount /*.jsp ajp13

        JkMount /servlet/* ajp13
        JkMount /*.do ajp13
        # Deny direct access to WEB-INF
        <LocationMatch ".*WEB-INF.*">
                deny from all
        </LocationMatch>
</VirtualHost>


Thanks.
--
View this message in context: 
http://www.nabble.com/Unwanted-URL-rewriting---apache-replaces-server-name-with-ip-in-address-bar-tf3700638.html#a10348497
Sent from the Apache HTTP Server - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://www.victortrac.com

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to