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 httpd.conf file regeneration issue

Discussion in 'General Discussion' started by Hoss, Feb 1, 2010.

  1. Hoss

    Hoss Active Member

    Joined:
    Oct 15, 2002
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    I'm tired of constantly fighting this issue and have been unable to suss a solution just yet.
    Everytime cpanel updates my httpd.conf file it adds the folllowing to the very bottom of the file..

    The problem is that I have IP 66.xxx.xxx.133 set up in a virutalhost container above with it set to port 80
    <VirtualHost 66.xxx.xxx.133:80>
    And my DocumentRoot is NOT /usr/local/apache/htdocs
    but IS instead /home/mysite/public_html

    Which means everytime apache gets gracefully restarted after cpanel has changed the .conf file I get this error.

    There has to be a simple fix to this issue?


    While I'm here I also have another small issue which is not of much consequence, but...
    cpanel also always generates this entry

    But of course DocumentRoot /dev/null
    does not exist. So if you run a configtest it always protests about that entry. I don't believe it causes any harm, but...
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  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:
    The WHM domain forwarding virtual host may be safely removed by disabling the feature using WHM via the following menu path:
    WHM: Main >> DNS Functions >> Setup/Edit Domain Forwarding >> Click to remove domain forwarder
     
  4. Hoss

    Hoss Active Member

    Joined:
    Oct 15, 2002
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Thanks Don, do you have any idea what's generating the other entry?
    And yes of course I've run the distiller. I'm not having any issues with my configuration not staying as I've set it. Just that the entry always gets added. This has been happening for a long time now.
     
  5. 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:
    Without knowing the full context of the situation (as determined via direct access to the system) it is difficult to say with certainty; however, I would venture to believe it is simply the default virtual host and if that is the case it is normal to have the entry in the Apache configuration.
     
  6. Hoss

    Hoss Active Member

    Joined:
    Oct 15, 2002
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    That would make sense as it's the base system IP (1st one)
    Is there no simple way to resolve this? Or anyway at all, for that matter?
    I am going to be upgrading servers soon, but currently running Apache 1.41 Virtual host containers are not my forte, but would a workaround be if Listen is set as
    Listen 0.0.0.0:80
    Above in the httpd.conf file (and it is)

    Can I then remove the :80 option from the IP address's in <VirtualHost>

    I've read that in Apache 2 this is how you must set it up.

    A quick addition
    Is what I get in WHM: Main >> DNS Functions >> Setup/Edit Domain Forwarding
    But as I recall it was set before to the 134 IP
    So can I simply delete that entry > run distiller and make it safely go away?
     
    #6 Hoss, Feb 1, 2010
    Last edited: Feb 1, 2010
  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 would add the port in the single default virtual host directive rather than attempt to edit all other virtual hosts.

    After applying changes, ensure to run the distiller, rebuild httpd.conf (as seen below), then restart Apache:
    Code:
    # /scripts/rebuildhttpdconf
     
  8. 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 would simply toggle the option in WHM, (enable then disable), then, as a precaution, rebuild httpd.conf using the aforementioned command via SSH
     
  9. 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:
Loading...

Share This Page