The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Apache worker, which is correct syntax?

Discussion in 'EasyApache' started by OooLong, Apr 27, 2014.

  1. OooLong

    OooLong Well-Known Member

    Joined:
    Mar 16, 2011
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    I'm seeing several posts around that some use:

    <IfModule mpm_worker_module>

    and some use

    <IfModule worker.c>

    which one is correct? Thanks in advance.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Per the Apache documentation:

    Terms Used to Describe Modules - Apache HTTP Server

    Source File:
    This quite simply lists the name of the source file which contains the code for the module. This is also the name used by the <IfModule> directive.


    Module Identifier:
    This is a string which identifies the module for use in the LoadModule directive when dynamically loading modules. In particular, it is the name of the external variable of type module in the source file.


    Thus, you should use the source module (worker.c) when using IfModule directives. That being said, I believe either of the entries you listed would technically work as intended.

    Thank you.
     
  3. OooLong

    OooLong Well-Known Member

    Joined:
    Mar 16, 2011
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    Thank you.
     
  4. OooLong

    OooLong Well-Known Member

    Joined:
    Mar 16, 2011
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    One last question. I added this in pre_main_global.conf:

    Do I need to run /usr/local/cpanel/bin/apache_conf_distiller --update and /scripts/rebuildhttpdconf for the include to take effect?
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You do not have to run the distiller, but it's a good idea to test the changes before restarting Apache with a command such as:

    Code:
    /usr/local/apache/bin/apachectl configtest
    Thank you.
     
  6. OooLong

    OooLong Well-Known Member

    Joined:
    Mar 16, 2011
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Website Owner
    Michael,

    Sorry one last thing. I just somewhere that I do not need to use <IfModule worker.c> </IfModule>

    Was I right to use it when adding it in pre_main_global.conf? and how do I know if it actually work? Thanks that's my last question.
     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Those are normal entries when configuring MPM Worker settings. You can use the "Pre Main Include" editor via "WHM Home » Service Configuration » Apache Configuration » Include Editor" if you prefer to add those values in Web Host Manager, but editing that file in the command line will do the same thing.

    Thanks.
     
Loading...

Share This Page