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.

Huge Problems with Apache Rebuild | Apache Templates | Apache Conf Caching

Discussion in 'EasyApache' started by hodfords, Feb 22, 2010.

  1. hodfords

    hodfords Active Member

    Joined:
    Feb 22, 2002
    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    6
    We are on:-

    Apache 1.3.X
    Php 4.4.X
    WHM 11.25

    We are trying to add PHP open_basedir to some and exclude some other accounts.

    Problem No 1
    ==========

    To Replicate
    =========

    - No edits at /var/cpanel/templates/apache1/vhost.default will have any difference on the final /usr/local/apache/conf/httpd.conf file when open_basedir changes are made at > Security Centre > PHP open_basedir Tweak
    - The only way to get the custom changes made on /var/cpanel/templates/apache1/vhost.default to appear in /usr/local/apache/conf/httpd.conf is to run /scripts/rebuildhttpdconf
    - When another account is taken off the exclude list under
    > Security Centre > PHP open_basedir Tweak - The custom template at
    /var/cpanel/templates/apache1/vhost.default does not show up
    - Hence each time we make a change to PHP open_basedir system - we have to rebuild httpd

    This is absurd. What is the point of the template? How does one change the cached settings for the php open_basedir for each account?

    And forget about directly editing /usr/local/apache/conf/httpd.conf because those changes will be erased too.

    So there is some configuration caching somewhere - we want to know where that is stored so that we can edit or we remove the caching altogether.
     
  2. 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:
    Friendly Moderator Note

    To prevent confusion between different issues the post has been moved into its own dedicated thread; separating the message will also ensure more attention and visibility to the unique inquiry making it easier for others to contribute feedback. We have also received your support request (ticket) submission and are examining the provided details further.
     
    #2 cPanelDon, Feb 25, 2010
    Last edited: Feb 25, 2010
  3. 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:
    So that we can more accurately diagnose the issue and symptoms please provide the following additional details:
    1.) Via root SSH access, please let provide the output from the following commands:
    Code:
    # /scripts/easyapache --version
    # /usr/local/cpanel/bin/rebuild_phpconf --current
    # find /var/cpanel/templates/apache*/ -iname "*.local"
    2.) Could you provide an example of the exact change being applied to the template files; I would like to try reproducing the issue using the same modification on a local test machine.

    If a bug is suspected please note that the best avenue to report it is via our ticket system; however, as you active support request open the possibility of a bug should be investigated further via the ticket (#585973) to ensure proper diagnosis and escalation.
     
  4. 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:
    During my initial testing I was unable to reproduce the symptom of the Apache configuration not rebuilding. Using the stock-default templates the Apache configuration file (httpd.conf) was successfully rebuilt during both actions of setting a host to be excluded from protection (i.e., disabling protection) as well as removing an exclusion for a host (i.e., enabling protection).
     
  5. hodfords

    hodfords Active Member

    Joined:
    Feb 22, 2002
    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    6
    EASY APACHE
    ==========

    Easy::Apache v3.2.0 Build 5013

    [cpanel]
    11.25.0-RELEASE_42400


    [apache]
    Server version: Apache/1.3.41 (Unix)
    Server built: Feb 2 2010 22:17:10
    Cpanel::Easy::Apache v3.2.0 rev4990


    [server]
    Linux server2.hodfords.net 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 EST 2010 x86_64 x86_64 x86_64 GNU/Linux

    PHP CONF
    =======

    Available handlers: dso cgi none
    DEFAULT PHP: 4
    PHP4 SAPI: dso
    PHP5 SAPI: none
    SUEXEC: enabled

    find /var/cpanel/templates/apache*/ -iname "*.local"
    ========================================

    Generated nothing

    /********************************/
    To Replicate - please do this
    /********************************/

    (1) Start with a clean install add a few existing accounts already on it with PHP Open_basedir disabled
    (2) Go to WHM -> PHP Open_basedir Tweak
    (3) Enable Open_basedir and exclude some accounts and not others - reboot apache
    (4) Make the changes you want /var/cpanel/templates/apache1/vhost.default - Particularly under:-
    <IfModule concurrent_php.c>
    php4_admin_value open_basedir "[% vhost.homedir %]:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
    php5_admin_value open_basedir "[% vhost.homedir %]:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    <IfModule !concurrent_php.c>
    <IfModule mod_php4.c>
    php_admin_value open_basedir "[% vhost.homedir %]:/home/:/home/jason/accounts/[% vhost.user %]/:/usr/lib/php:/usr/php4/lib/php:/usr/local/lib/php:/usr/local/php4/lib/php:/tmp"
    </IfModule>
    <IfModule mod_php5.c>
    php_admin_value open_basedir "[% vhost.homedir %]:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    </IfModule>
    (5) Go back WHM -> PHP Open_basedir Tweak - Remove some of the excludes on the list and then reboot apache - Check /usr/local/apache/conf/httpd.conf and you'll see that none of the changes that you made to /var/cpanel/templates/apache1/vhost.default appear.
     
  6. hodfords

    hodfords Active Member

    Joined:
    Feb 22, 2002
    Messages:
    43
    Likes Received:
    1
    Trophy Points:
    6
    You experts - Any updates?
     
  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:
    I apologize for the delayed update; I have attempted to reproduce the issue but I was unable to determine more specific information regarding a cause. At this point given the provided information I believe it will help best if the issue is escalated via a support request so that we can investigate the symptoms directly on the affected server.

    When available, please let me know the ticket ID number (e.g., via a PM) upon submitting the support request so that I may follow-up internally. For reference, the links in my forums signature may be used to initiate a ticket submission (e.g., Support Options).
     
Loading...

Share This Page