You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "Paul D. Bain" <pa...@bigfoot.com> on 2002/07/12 05:43:04 UTC

Re: Quick yes/no question -- Answer is, "Yes."

At Thursday 7/11/02 10:20 PM, Chris Knipe wrote:

>Just a quick yes/no...
>
>When I defined a directive in httpd.conf, will it also be defined in all my
>vhosts?
>
>Kind Regards,
>Chris Knipe

Chris,

         Let me quote P.Wainwright, the author of the book "Professional 
Apache" (a damned good book):

<blockquote>
                 A virtual host container can enclose almost any directive 
acceptable to the main server configuration, including other containers 
like 'Directory' and 'Location.' In addition, virtual hosts inherit all 
directives defined in the server location, including 'Directory' and 
'Location' directives specified there, 'Alias' and "ScriptAlias' 
directives, and so on. This allows a set of generic defaults to be 
specified for all virtual hosts that individual hosts can then override or 
supplement according to their needs.

</blockquote> P. 249.

         Elsewhere, Wainwright, when discussing using Apache as a proxy, 
qualifies this remark by adding that:

                 The 'Listen' directives are not inherited [by virtual 
hosts], since they are not valid in 'VirtualHost' containers. The 'User' 
and 'Group' directives are inheirited only if 'suEXEC' is in use. 
Otherwise, they have no effect. P. 289.

HTH.

-- Paul Bain


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Quick yes/no question -- Answer is, "Yes."

Posted by "Paul D. Bain" <pa...@bigfoot.com>.
At Thursday 7/11/02 11:51 PM, C. Knipe wrote:

>I understood your
>quote brilliantly, and I take my hat of to this author!!!  Definately a book
>I will aim to get for myself very soon!!!

Chris,

         Make sure that you get the _second_ edition, whose title is 
"Professional Apache 2.0." The author is Peter Wainwright, and the 
Publisher is Wrox.

-- Paul B.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: Quick yes/no question -- Answer is, "Yes."

Posted by Chris Knipe <sa...@savage.za.org>.
Thanks allot Paul...

This awnsers my question 100% smack on the head, and was exactly what I was
looking for.

I thought that this may be the case, seeing that with mod_php for example, 
"application-type .... .php" is only specified once, whilst every vhost would
then have php access.

The scenario I want to achieve now, is by for example, only allowing php on
certain vhosts, fronpage on others, etc etc etc, whilst I have globals which
needs to be on all vhosts, such as mod_gzip.  So, if I understand this 
correctly, which I think I do, my apache config will be something like this:

mod_gzip on

<virtualhost php4.site>
  application-type php stuff here.
</virtualhost>

<virtualhost frontpage.site>
  frontpage stuff here.
</virtualhost>

frontpage.site would have gzip with frontpage extentions, whilsts php.site
would have gzip with php4.  If this is indeed correct, I understood your 
quote brilliantly, and I take my hat of to this author!!!  Definately a book
I will aim to get for myself very soon!!!

Once again, thanks a million ;)

--
me


On Thu, Jul 11, 2002 at 11:43:04PM -0400, Paul D. Bain wrote:
> At Thursday 7/11/02 10:20 PM, Chris Knipe wrote:
> 
> >Just a quick yes/no...
> >
> >When I defined a directive in httpd.conf, will it also be defined in all my
> >vhosts?
> >
> >Kind Regards,
> >Chris Knipe
> 
> Chris,
> 
>         Let me quote P.Wainwright, the author of the book "Professional 
> Apache" (a damned good book):
> 
> <blockquote>
>                 A virtual host container can enclose almost any directive 
> acceptable to the main server configuration, including other containers 
> like 'Directory' and 'Location.' In addition, virtual hosts inherit all 
> directives defined in the server location, including 'Directory' and 
> 'Location' directives specified there, 'Alias' and "ScriptAlias' 
> directives, and so on. This allows a set of generic defaults to be 
> specified for all virtual hosts that individual hosts can then override or 
> supplement according to their needs.
> 
> </blockquote> P. 249.
> 
>         Elsewhere, Wainwright, when discussing using Apache as a proxy, 
> qualifies this remark by adding that:
> 
>                 The 'Listen' directives are not inherited [by virtual 
> hosts], since they are not valid in 'VirtualHost' containers. The 'User' 
> and 'Group' directives are inheirited only if 'suEXEC' is in use. 
> Otherwise, they have no effect. P. 289.
> 
> HTH.
> 
> -- Paul Bain
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
> 
---end quoted text---

-- 
Kind Regards,
Chris Knipe

Cell: (072) 434 7582
MegaLAN Corporate Networking Services.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org