Results 1 to 10 of 10
  1. #1

    Cpanel and apache

    Hi,


    When there are too many virtual host in my server I got this error:
    [Fri May 13 17:36:36 2005] [error] (24)Too many open files: could not
    open transfer log file


    To fix that, I am removing all lines in my httpd.conf that contain
    CustomLog and BytesLog


    Is there a way to do this via cpanel?


    Also how can I ensure that cpanel do not add customlog and byteslog
    file for future websites.


    Also currently, the only way I know how to do it is by uploading the
    httpd.conf to a windows server, run a program to delete customlog and
    byteslog line, and then downloading httpd.conf.


    There has to be a less time consuming way.
    Is there a special script to do so?


    jonathan

  2. #2
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    you do know that by doing that, you will not get any stats from awstats and webalizer right?
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  3. #3
    Have you tried using a higher limit on your file descriptors first? As thelinuxguy pointed out, you probably don't want to remove all the log directives for each virtual host.

  4. #4
    No I didn't know. And it's too late. Because I did it. I thought awstats use it's own loging system in ~username/tmp

    Hik hik... How to increase limit on my filedescriptors?

    There is no way I can undo what I did right?

  5. #5
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    awstats reads the domlogs, unless you made a backup of your httpd you would have to add each one by hand.
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  6. #6
    Join Date
    Feb 2003
    Location
    Europe
    Posts
    55
    RCS is used whenever cpanel modifies the httpd.conf, there fore you should be able to recover most if not all of the old contents of your httpd.conf

    Of course, you should have a backup also ?

    Heres how to look for version / date info from RCS:

    root@eu5 [~]# rlog /usr/local/apache/conf/httpd.conf | head -35

    RCS file: /usr/local/apache/conf/httpd.conf,v
    Working file: /usr/local/apache/conf/httpd.conf
    head: 1.157
    branch:
    locks: strict
    root: 1.157
    access list:
    symbolic names:
    keyword substitution: kv
    total revisions: 157; selected revisions: 157
    description:
    Init by /scripts/checkallowoverride
    ----------------------------
    revision 1.157 locked by: root;
    date: 2005/05/27 01:20:09; author: root; state: Exp; lines: +1 -0
    Modified by /scripts/checksuspendpages.
    ----------------------------
    revision 1.156
    date: 2005/05/26 17:13:15; author: root; state: Exp; lines: +14 -0
    Modified by /scripts/wwwacct.
    ----------------------------
    revision 1.155
    date: 2005/05/11 01:27:10; author: root; state: Exp; lines: +1 -0
    Modified by /scripts/checksuspendpages.
    ----------------------------
    revision 1.154
    date: 2005/05/10 12:39:21; author: root; state: Exp; lines: +14 -0
    Modified by /scripts/wwwacct.
    ----------------------------
    revision 1.153
    date: 2005/05/07 03:28:20; author: root; state: Exp; lines: +0 -14
    Modified by /scripts/killdrrootvhost.
    ----------------------------
    revision 1.152

    To recover a version of this file look at the man pages for the command co ( man co ).

    HTH

    Neil

  7. #7
    As of now I can still see awstats and webalizer.

  8. #8
    Join Date
    Mar 2003
    Location
    California USA
    Posts
    13,681
    of course you can see them, but they wont update. the need the domlogs.. how do you expect them to get stats? apache has to log some how and you removed the logging.
    Steven Ciaburri | Industry's Best Server Management - Rack911.com
    Software Auditing - 400+ Vulnerabilities Found - Quote @ https://www.RACK911Labs.com
    Fully Managed Dedicated Servers (Las Vegas, New York City, & Amsterdam) (AS62710)
    FreeBSD & Linux Server Management, Security Auditing, Server Optimization, PCI Compliance

  9. #9
    Join Date
    May 2002
    Location
    Kingston, Ontario
    Posts
    1,588
    Ouch, sounds like you did some damage to your HTTPD.CONF file so now all your sites have no updated logs and won't until you fix your httpd.conf file again.

    Always make backups before you play Hero and decide to manually hack a file up. Only a real Hero can fix their mistakes

    Good luck

  10. #10
    Ha ha ha ha ha....

    I don't need logging for my old sites.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •