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.

Change httpd.conf using WHM

Discussion in 'General Discussion' started by jfha73, Apr 20, 2010.

  1. jfha73

    jfha73 Member

    Joined:
    Apr 17, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    Id there a way to change httpd.conf using WHM besides the Apache configuration in services?

    I need to change the AllowOverride line to it but I can't find where to do it.

    Thanks
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    There is no way to directly edit httpd.conf from the WebHost Manager. If you need to edit it, use an include. Changes made by directly editing httpd.conf will not be preserved if you update Apache or rebuild the configuration. The following section of our EasyApache documentation explains how to do this:

    CustomDirectives < EasyApache3 < TWiki
     
  3. jfha73

    jfha73 Member

    Joined:
    Apr 17, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    So, if I edit httpd.conf in the folders they say in the help, it should affect apache, right?

    If so, which AllowOverride should I modify so all the sites (domains) I have get affected ?
     
  4. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Use a custom template

    To make a change that will be applied to all virtual hosts, modify the template that is used to create the virtual host containers.. This section of our documentation explains how to do this:

    InsideVHost < EasyApache3 < TWiki

    The changes that you make to the templates will be included in the <VirtualHost></VirtualHost> containers when you rebuild the Apache configuration. /scripts/rebuildhttpdconf will rebuild the httpd.conf file based on the distilled configuration and the templates in the /var/cpanel/templates and /var/cpanel/userdata directories.
     
  5. jfha73

    jfha73 Member

    Joined:
    Apr 17, 2010
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I tried both:

    Editing /usr/local/apache/conf/httpd.conf replacing

    AllowOverride None

    for

    AllowOverride All

    For both directory entries ("/" and "/usr/local/apache/htdocs")

    But it didn't work, so I tried creating a httpd.conf in .../userdata/2/user/domain.com/httpd.conf

    Enabling the include in the VirtualHost and copying the two directory entries and it didn't work either, any other suggestion?
     
  6. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    We may be able to better assist if we can know more about the specific issue or goal that has necessitated the desired modifications. Please let us know what it is that is needing to be accomplished (or fixed?) by the Apache configuration changes; the more detail that can be provided the better the chances are that we can ascertain an accurate diagnosis and suggest a resolution path or offer ideas on how to move forward.
     
  7. cPanelDon

    cPanelDon cPanel Quality Assurance Analyst
    Staff Member

    Joined:
    Nov 5, 2008
    Messages:
    2,557
    Likes Received:
    7
    Trophy Points:
    38
    Location:
    Houston, Texas, U.S.A.
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    To confirm, when applying modifications manually via root SSH access, is Apache/httpd being restarted to ensure the changes take effect?
     
Loading...

Share This Page