httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krist van Besien <krist.vanbes...@gmail.com>
Subject Re: [users@httpd] vhost not receiving the connections
Date Mon, 10 Aug 2009 05:22:24 GMT
On Mon, Aug 10, 2009 at 3:48 AM, Jean-François<grattojf@gmail.com> wrote:
> Hello,
>
> I’m having an issue with serving the correct pages on my httpd with vhosts.

That is because you haven't properly configured it.

You need the following directive:

NameVirtualhost *.80

You don't put ip's or hostnames in the NameVirtualHost statement,
unless you really know very well what you are doing...

Then you need to add your vitualhosts with exactly the same parameter
in the VirtualHost block:

<VirtualHost *:80>

Servername w.dnsalias.net

# rest of your directives for w.dnsalias.net

</VirtualHost>

<VirtualHost *:80>

ServerName x.dnsalias.net

# rest of your directives for x.dnsalias.net

<VirtualHost>

This is an error often made by people configuring virtualhosts for the
first time (and not reading the documentation properly :-)
The paramter to <VirtualHost> is not the hostname of your virtualhost,
it is the ip/port combination you have configured name based virtual
hosts on...

Once you've got your hosts configured properly just test your config
with "httpd -S". You should get a nice list of your hosts...


Krist



-- 
krist.vanbesien@gmail.com
krist@vanbesien.org
Bremgarten b. Bern, Switzerland
--
A: It reverses the normal flow of conversation.
Q: What's wrong with top-posting?
A: Top-posting.
Q: What's the biggest scourge on plain text email discussions?

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