httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From CJ <unix1...@yahoo.com>
Subject RE: [users@httpd] need help with ip addr not resolving to www name.
Date Fri, 24 Oct 2003 13:13:37 GMT
Ok now I receive the following error: 
It still displays the ip in the url and five me the
page cannto be found errror. 

On another window I received a tcp error message 
tcp_error communication error occured. 



--- Boyle Owen <Owen.Boyle@swx.com> wrote:
> >-----Original Message-----
> >From: CJ [mailto:unix1adm@yahoo.com]
> >
> >This is what I see in my error log.. Also the page
> >never loads. 
> >
> >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.
> 
> 
> 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. 
> 
> 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. 
> 
> >
> >I was following the example on th www site and in
> this
> >mail. Not sure what I did wrong. 
> >
> >--- Boyle Owen <Owen.Boyle@swx.com> wrote:
> >> Plain text please...
> >> 
> >> 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...
> >> 
> >> Assuming http, a URL consists of two parts: 
> >> 
> >> 	http://host/localinfo
> >> 
> >> - 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".
> >> 
> >> 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...
> >> 
> >> 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.
> >> 
> >> NameVirtualHost *
> >> 
> >> # Fake VH to trap host-less requests
> >> <VirtualHost *>
> >>   ServerName dummy-fake
> >>   Redirect / http://www.your-server.com/
> >> </VirtualHost>
> >> 
> >> # Real VH
> >> <VirtualHost *>
> >>   ServerName www.your-server.com
> >>   DocumentRoot /path/to/real/site
> >>   ...etc.
> >> 
> >> So what happens is:
> >> 
> >> - request comes in with no host header
> >> - doesn't match VH1 (servername = dummy-fake)
> >> - doesn't match VH2 (servername =
> >> 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 =
> >> www.your-server.com
> >> - doesn't match VH1 (servername = dummy-fake)
> >> - matches VH2 so browser gets that data.
> >> 
> >> Rgds,
> >> Owen Boyle
> >> Disclaimer: Any disclaimer attached to this
> message
> >> may be ignored. 
> >> 
> >> -----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.
> >> 
> >> 
> >> 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
> >> Diese E-mail ist eine private und persönliche
> >> Kommunikation. Sie hat
> >> keinen Bezug zur Börsen- bzw. Geschäftstätigkeit
> 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
> 
=== message truncated ===


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