Return-Path: Delivered-To: apmail-httpd-users-archive@www.apache.org Received: (qmail 43030 invoked from network); 24 Oct 2003 12:02:18 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 24 Oct 2003 12:02:18 -0000 Received: (qmail 14096 invoked by uid 500); 24 Oct 2003 12:02:02 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 14080 invoked by uid 500); 24 Oct 2003 12:02:02 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 14063 invoked from network); 24 Oct 2003 12:02:01 -0000 Received: from unknown (HELO ns0b.swx.com) (146.109.240.235) by daedalus.apache.org with SMTP; 24 Oct 2003 12:02:01 -0000 Received: from gate0b.unix.swx.ch (gate0b [192.168.252.145]) by ns0b.swx.com (8.12.10/8.12.10) with ESMTP id h9OC21Bj016268 for ; Fri, 24 Oct 2003 14:02:01 +0200 (MEST) Received: from SOMEXEVS001.ex.ordersx.org (localhost [127.0.0.1]) by gate0b.unix.swx.ch (8.12.10/8.12.10) with ESMTP id h9OC209g007733 for ; Fri, 24 Oct 2003 14:02:00 +0200 (MEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 Date: Fri, 24 Oct 2003 14:02:00 +0200 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [users@httpd] need help with ip addr not resolving to www name. Thread-Index: AcOaIoay6c05tDADRyeE88yTNUga2gAA0zUA From: "Boyle Owen" To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Subject: RE: [users@httpd] need help with ip addr not resolving to www name. X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N >-----Original Message----- >From: CJ [mailto:unix1adm@yahoo.com] > >This is what I see in my error log.. Also the page >never loads.=20 > >123.123.123.123 - - [23/Oct/2003:09:28:45 -0400] "GET >/index_main.html HTTP/1.1" 302 318 > >What is the 302 and 318 code??? I also saw 330 >342,352,338 , lots of 311 and 296 codes at the end.=20 The 302 is the HTTP status code. Here's a good definition of these: = http://www.december.com/html/spec/httpstat.html. In this case, 302 is a = redirection message.=20 The 318 is not a code, it's the number of bytes in the response. 318 = bytes is quite small but typical of the short redirection message your = server sent. Returning to the problem, since your browser fails to load anything, the = redirection address must be wrong. You should feel happy - you've got it = half-working :-) To proceed, you need to see what's wrong with the redirection address. - what does the browser address change to (it should change to the new = address when redirected)? - what have you defined in the "Redirect" directive in your config? Rgds, Owen Boyle Disclaimer: Any disclaimer attached to this message may be ignored.=20 > >I was following the example on th www site and in this >mail. Not sure what I did wrong.=20 > >--- Boyle Owen wrote: >> Plain text please... >>=20 >> I think you might be misunderstanding the function >> of the ServerName >> directive. It is used by apache to match INCOMING >> requests to the >> appropriate virtual host. It is not "returned" to >> the client... >>=20 >> Assuming http, a URL consists of two parts:=20 >>=20 >> http://host/localinfo >>=20 >> - The "host" can be a fully-qualified domain name, >> like www.amazon.com, >> a machine name on the local network, or a bare IP >> address. It may or may >> not include a port number - if it doesn't, port 80 >> is assumed. In any >> case, it must resolve to an IP address. >> - The "localinfo" is the path to the file you want >> from the DocumentRoot >> of the VH defined by the "host". >>=20 >> If your link contains an IP address as the Host, >> then when the request >> arrives at apache, it will have no "host" >> information. If you have >> several name-based VHs, apache will not be able to >> match it to any >> particular one and so will serve the first VH by >> default. If you have >> only one VH, it will serve that one. Note that >> apache just serves files >> - it doesn't tell the client anything about the VH >> configuration... >>=20 >> However, the way to get things to work the way you >> want is to set up >> name-based virtual hosting with two VHs. One is your >> "real" VH with the >> "real" ServerName and the other, which must come >> first, is a dummy VH >> with a fake ServerName. The dummy VH then redirects >> all traffic to the >> real VH. E.g. >>=20 >> NameVirtualHost * >>=20 >> # Fake VH to trap host-less requests >> >> ServerName dummy-fake >> Redirect / http://www.your-server.com/ >> >>=20 >> # Real VH >> >> ServerName www.your-server.com >> DocumentRoot /path/to/real/site >> ...etc. >>=20 >> So what happens is: >>=20 >> - request comes in with no host header >> - doesn't match VH1 (servername =3D dummy-fake) >> - doesn't match VH2 (servername =3D >> www.your-server.com) >> - so apache serves VH1 by default >> - VH1 says, redirect to www.your-server.com >> - apache sends 301 Redirect to the browser >> - browser receives the redirect and changes display >> to read >> www.your-server.com >> - new request comes in WITH host header =3D >> www.your-server.com >> - doesn't match VH1 (servername =3D dummy-fake) >> - matches VH2 so browser gets that data. >>=20 >> Rgds, >> Owen Boyle >> Disclaimer: Any disclaimer attached to this message >> may be ignored.=20 >>=20 >> -----Original Message----- >> From: CJ [mailto:unix1adm@yahoo.com] >> Sent: Donnerstag, 23. Oktober 2003 02:21 >> To: users@httpd.apache.org >> Subject: [users@httpd] need help with ip addr not >> resolving to www name. >>=20 >>=20 >> How can I get apache to not return the IP address of >> my server.=20 >> =20 >> I have links that go to an address of=20 >> =20 >> 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.=20 >> =20 >> 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.=20 >>=20 >>=20 >> 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 >>=20 >>=20 >> Do you Yahoo!? >> The New Yahoo! Shopping - with improved product >> search >> Diese E-mail ist eine private und pers=F6nliche >> Kommunikation. Sie hat >> keinen Bezug zur B=F6rsen- bzw. Gesch=E4ftst=E4tigkeit der >> SWX Swiss Exchange. >> This e-mail is of a private and personal nature. It >> is not related to >> the exchange or business activities of the SWX Swiss >> Exchange. Le >> pr=E9sent e-mail est un message priv=E9 et personnel, >> sans rapport avec >> l'activit=E9 boursi=E8re de la SWX Swiss Exchange. >>=20 >> This message is for the named person's use only. It >> may contain >> confidential, proprietary or legally privileged >> information. No >> confidentiality or privilege is waived or lost by >> any mistransmission. >> If you receive this message in error, please notify >> the sender urgently >> and then immediately delete the message and any >> copies of it from your >> system. Please also immediately destroy any >> hardcopies of the message. >> You must not, directly or indirectly, use, disclose, >> distribute, print, >> or copy any part of this message if you are not the >> intended recipient. >> The sender's company reserves the right to monitor >> all e-mail >> communications through their networks. Any views >> expressed in this >> message are those of the individual sender, except >> where the message >> states otherwise and the sender is authorised to >> state them to be the >> views of the sender's company.=20 >>=20 >>=20 >>=20 >> >--------------------------------------------------------------------- >> The official User-To-User support forum of the >> Apache HTTP Server Project. >> See 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 >>=20 > > >=3D=3D=3D=3D=3D >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 >http://shopping.yahoo.com > >--------------------------------------------------------------------- >The official User-To-User support forum of the Apache HTTP=20 >Server Project. >See 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 > > --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See 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