httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <tevans...@googlemail.com>
Subject Re: [users@httpd] Re: VirtualHosts warning
Date Mon, 07 Jun 2010 13:49:27 GMT
On Sat, Jun 5, 2010 at 6:55 AM, LuKreme <kremels@kreme.com> wrote:
> On 4-Jun-2010, at 08:20, Tom Evans wrote:
>>
>> On Fri, Jun 4, 2010 at 3:13 PM, LuKreme <kremels@kreme.com> wrote:
>>> # apachectl -S
>>> VirtualHost configuration:
>>> wildcard NameVirtualHosts and _default_ servers:
>>> *:*                    is a NameVirtualHost
>>> …
>>> Syntax OK
>>>
>>>
>>> Is this something that needs fixing? I ask because everything appears to work.
And how does one fix it. I've read the docs and I have to say I don't understand the issue.
>>>
>>
>> I don't think there is anything to fix there. What did you think was a
>> warning - '*:*                    is a NameVirtualHost'? That is
>> purely information.
>
> No, the line above that. I read:
>
>> With the NameVirtualHost directive you specify the IP address on which the server
will receive requests for the name-based virtual hosts. This will usually be the address to
which your name-based virtual host names resolve. In cases where a firewall or other proxy
receives the requests and forwards them on a different IP address to the server, you must
specify the IP address of the physical interface on the machine which will be servicing the
requests. If you have multiple name-based hosts on multiple addresses, repeat the directive
for each address.
>
> Since this is my home installation, I cannot specify an IP address as my IP changes.
Not very often (ever year or so), but it does change.
>
> My initial reading of that paragraph led me to the mistaken conclusion that I was supposed
to use an IP address (which is how my 'real' server is configured). Reading further, I see
that '*' is specifically listed as allowed.
>
>

The line above that is a title :/

The argument to NameVirtualHost is a 'IP/socket glob', ie these are all valid:

somehost.com:80
11.22.33.44:80
*:80
*

Typically, if you are doing 'bog standard' name virtual hosting,
specify your vhosts like so:

NameVirtualHost *:80

<VirtualHost *:80>
  ServerName somehost.com
</VirtualHost>

It gets slightly trickier when you want to do SSL, or mixed name
virtual host/non name virtual host, or only serve some vhosts on
requests that come in on a specific interface.

Cheers

Tom

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