Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Apache: Users

IfModule behavior inside VirtualHost stanza

 

 

Apache users RSS feed   Index | Next | Previous | View Threaded


seth.stone at gmail

Oct 30, 2009, 3:15 PM

Post #1 of 3 (417 views)
Permalink
IfModule behavior inside VirtualHost stanza

I'm running Apache 2.2.3-31 on RHEL 5.4 and am running into an issue
with using an <IfModule> 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.  However, 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

<VirtualHost>
:
        <IfModule mod_jrun22.c>
                # JRun Settings
                JRunConfig Verbose false
                JRunConfig Apialloc false
                JRunConfig Serverstore
/opt/jrun4/lib/wsconfig/2/jrunserver.store
                JRunConfig Bootstrap 127.0.0.1:51000
        </IfModule>
</VirtualHost>

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 <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


nick at webthing

Oct 30, 2009, 3:27 PM

Post #2 of 3 (389 views)
Permalink
Re: IfModule behavior inside VirtualHost stanza [In reply to]

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

1. Why are you using <IfModule> ? 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 <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd


seth.stone at gmail

Oct 30, 2009, 3:46 PM

Post #3 of 3 (388 views)
Permalink
Re: IfModule behavior inside VirtualHost stanza [In reply to]

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 <nick [at] webthing> 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 <IfModule> block inside of a VirtualHost stanza. If my
>
> 1.  Why are you using <IfModule> ?  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 <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe [at] httpd
>  "   from the digest: users-digest-unsubscribe [at] httpd
> For additional commands, e-mail: users-help [at] httpd
>
>

---------------------------------------------------------------------
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 [at] httpd
" from the digest: users-digest-unsubscribe [at] httpd
For additional commands, e-mail: users-help [at] httpd

Apache users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.