NameVirtualHost: Questions on proper usage
am 16.09.2009 20:54:18 von Tim Legg
Hello,
I am wanting to clean up my Apache 2.2.9 (Debian Package) installation after modifying it to virtual host 7 domains in order to make it more robust, understandable, secure and maintainable. I want to have one of these sites being a SSL site.
-----
I have read the section on NameVirtualHost,
http://httpd.apache.org/docs/2.0/mod/core.html#namevirtualho st
* Does NameVirtualHost get used in every entry in /etc/apache2/sites-available/ ? Is it redundant to include that declaration in all the others as well?
-----
The reason I ask this is I am having a warning delivered to me.
I initially have one website enabled. The entry in sites-available is defined like this:
NameVirtualHost *:80
....
When I enable a second website whose entry is identical in layout, I reload and am told:
[warn] NameVirtualHost *:80 has no VirtualHosts
And when I comment out the NameVirtualHost *:80, for the second entry in sites-available, the warning is gone. This leads me to believe that this declaration is redundant.
What are your thoughts?
Thanks for your help!
Tim Legg
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: NameVirtualHost: Questions on proper usage
am 16.09.2009 22:33:51 von Nick Kew
Tim Legg wrote:
> Hello,
>
> I am wanting to clean up my Apache 2.2.9 (Debian Package) installation after modifying it to virtual host 7 domains in order to make it more robust, understandable, secure and maintainable. I want to have one of these sites being a SSL site.
>
> -----
>
> I have read the section on NameVirtualHost,
> http://httpd.apache.org/docs/2.0/mod/core.html#namevirtualho st
>
> * Does NameVirtualHost get used in every entry in /etc/apache2/sites-available/ ? Is it redundant to include that declaration in all the others as well?
sites-available is a debianism designed to confuse.
You should only have one NameVirtualHost (for any IP:port).
It goes before any of the virtualhost definitions.
--
Nick Kew
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See 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
Re: NameVirtualHost: Questions on proper usage
am 17.09.2009 07:52:27 von Krist van Besien
On Wed, Sep 16, 2009 at 10:33 PM, Nick Kew wrote:
> Tim Legg wrote:
>>
>> Hello,
>>
>> I am wanting to clean up my Apache 2.2.9 (Debian Package) installation
>> after modifying it to virtual host 7 domains in order to make it more
>> robust, understandable, secure and maintainable. =A0I want to have one o=
f
>> these sites being a SSL site.
>>
>> -----
>>
>> I have read the section on NameVirtualHost,
>> http://httpd.apache.org/docs/2.0/mod/core.html#namevirtualho st
>>
>> * Does NameVirtualHost get used in every entry in
>> /etc/apache2/sites-available/ ? =A0Is it redundant to include that decla=
ration
>> in all the others as well?
>
> sites-available is a debianism designed to confuse.
I find it actually a quite usefull feature. Allows me to quickly
enable/disable virtual servers.
> You should only have one NameVirtualHost (for any IP:port).
> It goes before any of the virtualhost definitions.
The way I did it is to have a "000_default" in my sites-available,
that's always enabled (linked in sites-enabled).
In this file I have the NameVirtualHost directive, and the default,
catch-all, virtual host.
The other virtual hosts config files don't have the NameVirtualHost directi=
ve.
Krist
--=20
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 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