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.

Cpanel keeps changing httpd.conf

Discussion in 'General Discussion' started by dennismv, Jul 6, 2007.

  1. dennismv

    dennismv Member

    Joined:
    Sep 8, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    Problem: Cpanel keeps putting up a virtual host into my httpd.conf file. This causes a warning from apache, and also it disables my http access logging.

    #VirtualHost directive I already have in my httpd.conf
    <VirtualHost 44.44.44.45>
    ServerName www.domain.com
    .....
    .... more options here ...
    .....
    </VirtualHost>

    #VirtualHost directive Cpanel keeps adding (with the same IP address I've previously defined)?
    <VirtualHost 44.44.44.45>
    ServerName www.domain.com
    </VirtualHost>

    I have to go into httpd.conf every so often and delete this extra directive. I think it resets every day however, and messes up my log files.

    Is there a way to stop this from happening ?
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Simply set the attribute for the httpd.conf file with the below command

    chattr +i /usr/local/apache/conf/httpd.conf

    Nothing will be changed in the conf file unless attribute is removed. To remove the attribute use,

    chattr -i /usr/local/apache/conf/httpd.conf
     
  3. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    Shekhar, you are absolutely and completely out of your mind! :eek:

    This is EXTREMELY BAD ADVICE!

    While some files such as "/etc/antivirus.exim" and "/etc/resolv.conf" could benefit
    from setting the immutable flag to prevent overwrites, you are asking for nightmare
    problems if you set the immutable flag on the httpd.conf file!

    Any subdomain added or removed by ANY USER needs to update the httpd.conf

    Any add-on domain added or removed by ANY USER needs to update the httpd.conf

    Any parked domain added or removed by ANY USER needs to update the httpd.conf

    Changes to any of a great many settings in WHM will also effect the httpd.conf

    Even general Cpanel updates may make changes to the system that make your
    httpd.conf non-functional against the system software if the httpd.conf is immutable!
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,448
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Not sure of your problem, might want to contact cPanel via ticket system. Meantime, you can always disable auto updates. Short term fix so nothing breaks without you there running updates manually.
     
  5. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
     
    #5 madaboutlinux, Jul 8, 2007
    Last edited: Jul 8, 2007
  6. web-side.com

    web-side.com Registered

    Joined:
    Aug 2, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Same problem here, it messes with my httpd.conf file every day.. :/
     
Loading...

Share This Page