You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rasmus Lerdorf <ra...@lerdorf.on.ca> on 1998/02/21 10:26:22 UTC

Another .conf question

Question about per-directory .conf directives.  If I have the following:

<VirtualHost www.foo.com>
DocumentRoot /usr/foo
ServerName www.foo.com
MyDirective /usr/lib
</VirtualHost>

<Directory /usr/foo>
MyOtherDirective /usr/bar
</Directory>


MyDirective and MyOtherDirective are both directives defined in my own
module.  I would have assumed that for directory /usr/foo both of these
directives would be set.  From experimenting it looks to me like only
MyOtherDirective is set.  Would this be a problem in my module's merge
function or is it a limitation of the .conf code in Apache?

-Rasmus


Re: Another .conf question

Posted by Rasmus Lerdorf <ra...@lerdorf.on.ca>.
> I strongly suspect your merging function.  Are you sure your request is
> getting mapped into the www.foo.com vhost?  And, since they're two
> different directives (rather than one in two different places), are
> you sure they're affecting the same fields in your internal structures?

Aha.  Thanks.  Just needed a reality check there to make sure I wasn't
chasing down something that would never work.  I found the problem now.
It was indeed in the merge function.

-Rasmus



Re: Another .conf question

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Rasmus Lerdorf wrote:
> 
> Question about per-directory .conf directives.  If I have the following:
> 
> <VirtualHost www.foo.com>
> DocumentRoot /usr/foo
> ServerName www.foo.com
> MyDirective /usr/lib
> </VirtualHost>
> 
> <Directory /usr/foo>
> MyOtherDirective /usr/bar
> </Directory>
> 
> MyDirective and MyOtherDirective are both directives defined in my own
> module.  I would have assumed that for directory /usr/foo both of these
> directives would be set.  From experimenting it looks to me like only
> MyOtherDirective is set.  Would this be a problem in my module's merge
> function or is it a limitation of the .conf code in Apache?

I strongly suspect your merging function.  Are you sure your request is
getting mapped into the www.foo.com vhost?  And, since they're two
different directives (rather than one in two different places), are
you sure they're affecting the same fields in your internal structures?

#ken	P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Group member         <http://www.apache.org/>
"Apache Server for Dummies" <http://WWW.Dummies.Com/