httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leif W" <warp-...@usa.net>
Subject Re: [users@httpd] need help with ip addr not resolving to www name.
Date Thu, 23 Oct 2003 01:05:49 GMT
Plain text please.

Let me see if I understand correctly.  You want to know if there is a way to
type http://123.123.123.123/index.html in a browser, and have it go to
http://www.mydomain.com/index.html ?  Simple answer, no, complex answer, yes
(maybe?).

Simply, if a server has one ServerName or 1,000 ServerNames (and
ServerAliases) in VirtualHosts, all using a single IP, then how would Apache
know which ServerName to use?  It wouldn't.  So normally this condition
isn't something you see every day.

Complex answer, maybe if you setup your configs in VirtualHosts, and have a
VirtualHost with a ServerName of 123.123.123.123, which just does a redirect
or maybe a rewrite (not sure which) to the ServerName that you want to
appear.  Check the docs for VirtualHost configs, Redirect directive, and
possibly mod_rewrite.  Not sure which way is cleaner / clearer, probably the
rewrite but I'm not too familiar.  I'll look into this, an opportunity to
learn something.

Leif

----- Original Message ----- 
From: CJ
To: users@httpd.apache.org
Sent: Wednesday, October 22, 2003 8:21 PM
Subject: [users@httpd] need help with ip addr not resolving to www name.


How can I get apache to not return the IP address of my server.

I have links that go to an address of

http://123.123.123.123/index.html  but when you click on the link in the
browser address it shows the ip addr not the domain name. I have defined the
server in the httpd.conf file to be ServerName www.mydomain.com but it still
show the IP addr. Stopped and restarted the apache server etc.

The environment is such that the initial page is hosted on a 3rd party www
server and it has links back to the real server. The links work fine just
the IP addr is the problem.


There are two major products to come out of Berkeley: LSD and
UNIX. We don't believe this to be a coincidence.
Blessed are the pessimists, for they make backups!
Tell me and I forget. Show me and I remember. Involve me and I learn."
10101010011100101001001000011010000001000100101010101010
0011001010100010110010101000010001010000


Do you Yahoo!?
The New Yahoo! Shopping - with improved product search



---------------------------------------------------------------------
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: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message