[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] Apache



On Mon, Mar 26, 2001 at 01:16:53PM +0100, Ian Wright wrote:
> in my /etc/httpd/conf/httpd.conf file I have the lines:-
> 
> NameVirtualHost 192.168.1.2
> ServerName  brass

ServerName is usually the FQDN - although you may be able to access your machine as 'brass' on the local network, this is either because you setup the hosts file on each machine, or you have a 'search' in your resolv.conf, etc. But, that's almost acceptable :)

> and in /etc/hosts I have :-
> 
> 192.168.1.2    brass.metals.com    brass

Hmmm. Given that ('Ian Wright' ne 'Metal Management, Inc'), I presume you don't actually own metals.com :)) In which case, the above line looks decidedly dodgy. I could see that would conceivably confuse your local network, depending on the nsswitch.conf on your machines. I've also no idea how Windows would resolve that. All the names you put in /etc/hosts need to be accurate - i.e., brass.metals would be okay, but anything at metals.com could mean that a machine without an up-to-date hosts file would get referred to DNS, which would then send it off somewhere else (if you were lucky).

Generally speaking, it's also bad form to attach a private ip (192.168.1.2, for example) to a name which is part of the DNS structure (under com, for example), since that leads to idiots who pollute the global DNS with their cack-handed non-split DNS records (I can point you to an O'Reilly book in which the author does just that - unfortunately, it's not the DNS book :). Similar awfulness is perpetrated by those who set their hostname to something either a) unresolvable or b) resolves to another machine :(

Try the netstat grep and see what Apache is listening to - that at least shows you where the problem lies.

Cheers,

Alex.

-- 
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word 
 "unsubscribe" in the body of the message. 

  GNU the choice of a complete generation.