1

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 
4
  • Remove the ifmodule condition and see if it throws an error. Looks like the module isn't actually loaded. Sep 29, 2012 at 10:56
  • Tried. rcapache2 configtest throws exception Oct 2, 2012 at 19:27
  • And the exception is ... Oct 2, 2012 at 19:29
  • Invalid command 'WTF', perhaps misspelled or defined by a module not included in the server configuration Oct 2, 2012 at 19:32

1 Answer 1

2

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

5
  • 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) Oct 2, 2012 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? Oct 2, 2012 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 Oct 2, 2012 at 20:43
  • 3
    Ah. Now I understand. Try <IfModule mpm_itk_module> Oct 2, 2012 at 20:46
  • This works!!!!! Oct 3, 2012 at 21:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .