-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 07 December 2001 06:32 pm, Jim Bija wrote:
> OK, i think i have a handle on this one now guys. I believe what our
> problem is  as someone said a hostname problem of some sort. Ill put
> out what ive seen newbie style and someone who knows linux can explain
> it to all of us. By default install my hosts file was as such:
>
> 127.0.0.1    ns2 localhost.localdomain localhost
>
> this is a a ns2 server as well as www server, during install it asked
> me my hostname i told it, it added it to 127.0.0.1 and ignored my
> ethernet addrees (grumbles at redhat, this is a problem with your
> install program no?) anyway, sometime down the line i noticed this
> hosts file and thought, that just aint right so i changed it to
>
> 127.0.0.1 localhost.localdomain     localhost
> 1.1.1.1     ns2                                ns2.mydomain.com
>
> in my httpd.conf file the servername has untill tonight said
> ServerName www.mydomain.com which is not the case in reverse DNS so i
> changed it to ns2.mydomain.com (im slowly making things "correct") or
> atleast i think i am..
>
> This whole trailing slash thing came to me when someone said why doesnt
> this page work www.my.com/~eddie
> well someone told me that apache had recently made you put a trailing
> slash on dirs for some security problem, i said fine and excepted it.
[snip]
> PS* If anyone knows how i fixed my having to put trailing /'s on URLs i
> would like to know, k?  ;)
>
>
> ----- Original Message -----
> From: "Gordon Messmer" <[EMAIL PROTECTED]>

> > David~
> >
> > Your server is probably configured incorrectly, similarly to Jim's.
> >
> > If you're looking for evidence of the problem, don't expect IE to
> > hand it to you.  Install ngrep or ethereal on the web server, and use
> > it to watch the traffic on port 80.  I expect that you will see a
> > conversation like this:
> >
> > IE -> server
> > Host: server
> > GET /documents
> >
> > server -> IE
> > 301 Moved
> > Location: http://localhost.localdomain/documents/
> >
> > The web server has told the client where to get the "documents"
> > resource, but IE can't follow the instructions given, because they're
> > wrong.
> >
> > Your web server must know its local host name.  When you aren't doing
> > name based virutal hosts, then you pretty much always have to set
> > ServerName in /etc/httpd/conf/httpd.conf

There are a couple of possibilities here. I'll try to explain based on my 
network here. 
I have a single routable address, and an internal network. HTTP requests 
are forwarded from the external interface to a machine on the internal 
network.
So: www.tuxfan.homeip.net:8000  is forwarded to 192.168.0.5, a machine 
known as enigma.local on my network.
I set the ServerName directive on my webserver to:
ServerName www.tuxfan.homeip.net
If that were not set, error pages, info at the bottom of directory 
listings etc., would be listed as http://enigma.local/. 
So, if the ServerName directive wasn't set, and you requested:
http://www.tuxfan.homeip.net:8080/rpms
The server would reply:
301 Moved
Location: http://enigma.local:8080/rpms/ 
Obviously, no client would be able to resolve this, and it wouldn't work.

With it set, you instead get:
301 Moved
Location: http://www.tuxfan.homeip.net:8080/rpms/

That's one possibility you might look at. 

Another is the UseCanonicalName directive. With this directive set to 
'On' Apache will use the ServerName and Port directives when it needs to 
construct a self referencing URL. (As it must in the case of 301 errors)
So, with this set to 'On' if I access my server on the local network 
using the address: http://enigma.local:8080/rpms, it will return a 301 
error, and point me to: http://www.tuxfan.homeip.net:8080/rpms/. This 
would fail in my case due to firewall rules.
If UseCanonicalName is set to 'Off', Apache will use the hostname:port 
that the client supplied, and I would be pointed to 
http://enigma.local:8080/rpms/
I don't recall the default setting for UseCanonicalName, but it's worth 
looking into.

Hope that helps explain it a bit,

- -D

- -- 

pgp key:  http://www.tuxfan.homeip.net:8080/pgpkey.txt

- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE8EW+geMAUbzJhSVcRAmL/AKCN4i0RiQSmJzpkfHKyAvX99zDmlwCfc+ir
zDta3WYj7MoyORbH5xRzc/o=
=2PwX
-----END PGP SIGNATURE-----



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to