Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm running itk as Apache MPM.

In order to prevent error in case I need to change the MPM in the future, I set

    <IfModule itk.c>
        AssignUserID user group
    </IfModule>

but I found that it gets ignored. In fact, if I add a WTF like and run rcapache2 configtest it returns me Syntax OK

    <IfModule itk.c>
        AssignUserID user group
        WTF ##doesn't throw error
    </IfModule>

By the way, /etc/sysconfig/apache2 shows APACHE_MPM="itk"

How do I check if I'm running itk or not?

EDIT: If I remove the ifmodule and restart I get

Invalid command 'WTF', perhaps misspelled or defined by a module not included in the server configuration 
share|improve this question
    
Remove the ifmodule condition and see if it throws an error. Looks like the module isn't actually loaded. –  sonassi Sep 29 '12 at 10:56
    
Tried. rcapache2 configtest throws exception –  djechelon Oct 2 '12 at 19:27
    
And the exception is ... –  sonassi Oct 2 '12 at 19:29
    
Invalid command 'WTF', perhaps misspelled or defined by a module not included in the server configuration –  djechelon Oct 2 '12 at 19:32
add comment

1 Answer

up vote 1 down vote accepted

If it throws an error when IfModule is commented out, then Apache doesn't think the itk.c module is actually loaded (so its not parsing the contents of the conditional statement).

But that is not to say that the itk module isn't actually being loaded. Otherwise, you would likely also have a an exception being thrown for AssignUserID too.

This isn't the first time I've come across Apache mis-reading the .c/.h files and thinking a module isn't loaded, when it actually is.

To know if its actually running - just check your vhost user in top/ps

Eg. ps axu | grep -E '(apache|httpd)'

share|improve this answer
    
It is actually running and assigning User ID. So shouldn't I just care about that all? I mean, I asked this question because I wanted to put a switch on the AssignUserId, not make sure that itk was actually working (because I knew) –  djechelon Oct 2 '12 at 20:08
    
I don't understand your question then. You asked how you could verify if itk was running - and why your edits weren't showing an error on configtest. I explained how to test your edits and how to test if itk was working ... what else do you want/need to know? –  sonassi Oct 2 '12 at 20:20
    
"How to let Apache test if itk is enabled?". Do I need a different <IfModule> clause? I need this in the case I need to switch to a different MPM because I have several vhosts that would then need to be all modified. Now that I re-read the question I find I missed this part –  djechelon Oct 2 '12 at 20:43
2  
Ah. Now I understand. Try <IfModule mpm_itk_module> –  sonassi Oct 2 '12 at 20:46
    
This works!!!!! –  djechelon Oct 3 '12 at 21:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.