You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matus UHLAR - fantomas <uh...@fantomas.sk> on 2009/10/08 13:26:56 UTC

Re: [users@httpd] Using VirtualHosts, do I need to specify "main" ServerName?

> Edward Ruggeri wrote:
>> (Of course, my system hostname (in /etc/hostname) is not fully qualified.)

On 26.09.09 12:49, Stephen wrote:
> Your hostname, should have an entry in /etc/hosts
>
> 127.0.0.1 hostname
>
> Then Apache is happy and you are fine.

no, It should be at lease

127.0.0.1 localhost <fqdn> hostname

The former would cause resolving 127.0.0.1 to "hostname" that should cause
unexpected behavior in some applications. Imho, the 127.0.0.1 should always
resolve to "localhost"

...otoh, there is a 'hostname' utility that does the hostname resolution and
returns the resolved hostname which results to returning "localhost".

I've seen people using different IP from 127/8 range (127.0.1.1) for this to
work "correctly". Unluckily there is no IP address nor domain designed to do
this kind of things so you just have to play with it and see what works and
doesn't cause troubles.

-- 
Matus UHLAR - fantomas, uhlar@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
The only substitute for good manners is fast reflexes. 

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