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.

No ea3 problems, but a different question :)

Discussion in 'General Discussion' started by OffbeatAdam, Sep 13, 2007.

  1. OffbeatAdam

    OffbeatAdam Active Member

    Joined:
    Jan 24, 2006
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    San Antonio, TX
    EA3 apache_conf_distiller httpd.conf issues

    I'm happy that Apache 2 is here, and ran into no problems (mostly because any problem that was caused, was not ea3's fault, and I was able to fix those, albeit temporarily I think).

    I have two installs of apache, for good reason. My person sites make use of different technologies out of the scope of cpanel, that also require a heavily threaded version of apache to allow for appropriate resource management so as to not affect other users. This also allows me better control over my own sites, and allows me to well, finick around with my stuff and not hurt my users/customers.

    My issue is this, however. Since cPanel retains god status over email administration, I of course needed cpanel to know that these domains existed on this server, so that I could use email services. Thankfully I was able to make this happen, however, it would seem that after the build (and subsequent rebuilds for appropriate libraries), ea3 likes to... rebuild the httpd.conf, entirely. This breaks my other apache load, as it assumes a "Listen 80" option instead of a 'Listen xxx.xxx.xxx.xxx:80' option, thus conflicting with the other listening. I have 4 dedicated IPs on this box meant strictly for my domains, so there are no users using these domains... i have 8 others for them.

    Ultimately, my issue/question is this...

    Can I have cpanel ignore these domains in any way?

    Or, has anyone come up with a solution to stop cpanel from assuming control of the entire listening space?

    DNS handles the IP address issue, the virtual hosts can exist for all i care in reality. DNS is a separate server for my domains, so even the DNS on the server doesn't matter, they're not authortative.

    This isn't necessarily a big deal, however it does get annoying on occasion, especially if cpanel attempts to do its normal config update that wipes out custom changes ;)
     
    #1 OffbeatAdam, Sep 13, 2007
    Last edited: Sep 16, 2007
  2. OffbeatAdam

    OffbeatAdam Active Member

    Joined:
    Jan 24, 2006
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    San Antonio, TX
    Well, since EA3 for whatever reason is more anal about changes to httpd.conf, it broke completely and wouldn't start. So, this has become more of an issue now.

    In my investigating I found that apache_conf_distiller is used to create the template for the conf file.

    In looking at apache_conf_distiller, I see that there is an area:

    # Prevent section skip, just remove directive
    $skip_directives{'listen'} = qr{^\s+80\s*$};
    $skip_directives{'scoreboardfile'} = undef;
    $skip_directives{'sslpassphrasedialog'} = undef;
    $skip_directives{'sslsessioncache'} = undef;
    $skip_directives{'sslsessioncachetimeout'} = undef;
    $skip_directives{'sslmutex'} = undef;
    $skip_directives{'sslrandomseed'} = undef;
    $skip_directives{'ssllog'} = undef;
    $skip_directives{'sslloglevel'} = undef;
    $skip_directives{'userdir'} = undef;

    I see the problem is being caused by $skip_directives{'listen'} = qr{^\s+80\s*$};, where the regex is pleasantly just putting a "listen 80" in.

    I'm going to assume that if I comment that out, this won't happen.

    Assume :)

    This is the only occurrence of the listen directive in the file.

    After doing this, and running apache_conf_distiller --update, the file:

    /var/cpanel/conf/apache/main

    lists the directive that I have manually specified in my httpd.conf:

    listen:
    directive: listen
    items:
    -
    listen: 75.126.176.100:80
    -
    listen: 75.126.176.101:80
    -
    listen: 75.126.176.102:80
    -
    listen: 75.126.176.103:80

    Obviously this sort of thing is not a supported way to do things, not to mention I know that in an update (which, now that I have apache 2, unless I see good reason I have auto-updates turned off... ea3 screwed me on that one, wasn't awake -.-), the app will be changed back to the defaults if edited...

    however, anyone see anything wrong with that, or know of any other place the config file will be updated to include that annoying (and quite frankly, there should never be a global listen statement, you should be able to disable the listening on certain IPs, for many good reasons I don't think I really have to list...)
     
  3. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,458
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Add your custom stuff to a file that is Included into httpd.conf I *think* that will preserve your settings.
     
  4. OffbeatAdam

    OffbeatAdam Active Member

    Joined:
    Jan 24, 2006
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    San Antonio, TX
    Well, the bigger issue would be if it were to add the listen 80 line again.

    Whether I have listen xx.xx.xx.xx:80 lines or not in a custom file, listen 80 will take precedent. Thats... the issue. I need listen 80 to be sleeping with the fishes ;P
     
  5. jdlightsey

    jdlightsey Perl Developer III
    Staff Member

    Joined:
    Mar 6, 2007
    Messages:
    126
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Houston Texas
    cPanel Access Level:
    Root Administrator
    It will add the listen 80 line again because it's in the template used to generate httpd.conf.

    If you want to get rid of that line you would need to delete it in

    /var/cpanel/templates/apache(1 or 2)/main.local

    That should survive any changes to the system other than running apache_conf_distiller (meaning that if you recompile EA3 or run it manually, you'll need to change the listen directive again.)
     
  6. OffbeatAdam

    OffbeatAdam Active Member

    Joined:
    Jan 24, 2006
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    San Antonio, TX
    Ok.. cool.

    Now, if I change the directive in the apache distiller, where it sets it to skip the Listen directive, does that fix the listen directive replacement (up until a software update "fixes" said file?)
     
  7. OffbeatAdam

    OffbeatAdam Active Member

    Joined:
    Jan 24, 2006
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    San Antonio, TX
    Ok, this is getting really annoying.

    No matter what, every time you go in and change something in subdomains, dns, accounts, it doesn't matter... you screw up the httpd.conf.

    I'm sorry but, that is ridiculous. I realize that you attempt to make this a full solution that allows for easy configuration, however, there are many reasons that the httpd.conf would need to be edited.

    What if I have an IP address that has a specific use that I -absolutely- do not want to accept http traffic? I don't want it listening on that port on that address, but you are forcing me into this.

    php.ini, exim.conf, etc... all of these have editors, the one that doesn't is httpd.conf.

    And now, you make changes to httpd.conf at every turn.

    Why?

    I modified distiller, I modified .local, and it still was added.

    This brings my uptime down in a huge manner. If I can't go in and fix the httpd.conf, then I'm screwed.

    Listen 80 is the lazy mans configuration setting. For every socket it opens, there are more resources used, more log entries, more well, everything. I can't disable logs... I've done that all the times that I've removed the listen statement, and it comes right back. I can't disable the listen statement.

    So far the only bloody thing thats stayed is fcgid, and I'm not entirely sure why much less whether that makes me feel better or not.

    I've seen a few other people already on the forums with similar issues, and while I'm not a direct customer I can't necessarily open up a ticket or anything of that sort, neither can the reseller help me much since there is obviously no real fix for this unless you change some of your easy-way-out methodology.

    I'm not exactly sure what to do at this point, but really, some help would be appreciated on a rather annoying issue.
     
  8. phred_02

    phred_02 Member

    Joined:
    Jan 25, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Has there been any resolution to this problem? I too would like to be able to change to listen directive to ignore an IP address.


    Steve
     
  9. Scotty_B

    Scotty_B Active Member

    Joined:
    Mar 1, 2003
    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    1
    Did you find a way around this, I want to run Lighty for static content but don't want to have to clean up everytime cPanel farts.

    Ta
     
Loading...

Share This Page