IfModule behavior inside VirtualHost stanza

IfModule behavior inside VirtualHost stanza

am 30.10.2009 23:15:58 von Seth Stone

I'm running Apache 2.2.3-31 on RHEL 5.4 and am running into an issue
with using an block inside of a VirtualHost stanza. If my
VirtualHosts are defined in my main config file
(/etc/httpd/conf/httpd.conf) the IfModule test works fine. =A0However, I
prefer to store VirtualHost configuration in
/etc/httpd/conf.d/vhosts.conf - by simply moving the config from the
main file to the vhosts.conf file the behavior of the IfModule
changes.

Specifically I'm trying to test the presence of the jrun_module, like so:

LoadModule jrun_module /opt/jrun4/lib/wsconfig/1/mod_jrun22.so


:
   =A0 =A0 =A0
   =A0 =A0 =A0 =A0 =A0 =A0 =A0# JRun Settings
   =A0 =A0 =A0 =A0 =A0 =A0 =A0JRunConfig Verbose false
   =A0 =A0 =A0 =A0 =A0 =A0 =A0JRunConfig Apialloc false
   =A0 =A0 =A0 =A0 =A0 =A0 =A0JRunConfig Serverstore
/opt/jrun4/lib/wsconfig/2/jrunserver.store
   =A0 =A0 =A0 =A0 =A0 =A0 =A0JRunConfig Bootstrap 127.0.0.1:51000
   =A0 =A0 =A0



When the VirtualHost definition above appears in the main config file
the IfModule test returns true. If I leave the LoadModule in the main
config and move the VirtualHost definition to
/etc/httpd/conf.d/vhosts.conf the IfModule test fails for some reason.
Testing a different module such as mod_alias succeeds as expected.

Any ideas?

Thanks,
Seth

------------------------------------------------------------ ---------
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: IfModule behavior inside VirtualHost stanza

am 30.10.2009 23:27:10 von Nick Kew

Seth Stone wrote:
> I'm running Apache 2.2.3-31 on RHEL 5.4 and am running into an issue
> with using an block inside of a VirtualHost stanza. If my

1. Why are you using ? Unless you're constructing a
distribution whose management tools rely on it, there's absolutely
no reason to use it.

2. What you describe may depend on lexical order. Nothing more.

--
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: IfModule behavior inside VirtualHost stanza

am 30.10.2009 23:46:00 von Seth Stone

Well I'm basically carrying on a practice that was started by the JRun
web server connector tool that is using IfModule to prevent total
Apache startup failure if for some reason JRun/ColdFusion were to get
misconfigured or uninstalled.

In any case you were exactly right - the web server connector placed
the LoadModule directive for the jrun_module below the Include
directive for the conf.d/* directory. Moving it higher in the config
allowed the IfModule test in my separate vhosts.conf file to succeed.

Thanks for the help.

Seth


On Fri, Oct 30, 2009 at 5:27 PM, Nick Kew wrote:
> Seth Stone wrote:
>>
>> I'm running Apache 2.2.3-31 on RHEL 5.4 and am running into an issue
>> with using an block inside of a VirtualHost stanza. If my
>
> 1. =A0Why are you using ? =A0Unless you're constructing a
> distribution whose management tools rely on it, there's absolutely
> no reason to use it.
>
> 2. =A0What you describe may depend on lexical order. =A0Nothing more.
>
> --
> 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
> =A0" =A0 from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>

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