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.

Is this the correct way to stop the server from logging access and errors?

Discussion in 'General Discussion' started by Vatoloco, Jul 19, 2005.

  1. Vatoloco

    Vatoloco Well-Known Member

    Joined:
    Jun 21, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    I'm trying to stop all logging on one site and so I commented out the following in /etc/httpd/conf/httpd.conf

    <VirtualHost 55.55.555.55>
    ServerAlias www.mysite.com mysite.com
    ServerAdmin webmaster@mysite.com
    DocumentRoot /home/mysite/public_html
    #BytesLog domlogs/mysite.com-bytes_log
    ServerName www.mysite.com
    ServerAlias mysite.cc www.mysite.cc
    <IfModule mod_userdir.c>
    Userdir disabled
    Userdir enabled mysite
    </IfModule>
    <IfModule mod_php4.c>
    php_admin_value open_basedir "/home/mysite:/usr/lib/php:/usr/local/lib/php:/tmp"
    </IfModule>
    User mysite
    Group msysite
    #CustomLog domlogs/mysite.com combined
    ScriptAlias /cgi-bin/ /home/mysite/public_html/cgi-bin/
    </VirtualHost>
    But today I noticed /usr/local/apache/logs/access_log and /usr/local/apache/logs/error_log were growing huge, so I checked httpd.conf again and found these two entries:

    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here. Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    CustomLog /usr/local/apache/logs/access_log common

    # ErrorLog: The location of the error log file.
    # If you do not specify an ErrorLog directive within a <VirtualHost>
    # container, error messages relating to that virtual host will be
    # logged here. If you *do* define an error logfile for a <VirtualHost>
    # container, that host's errors will be logged there and not here.
    #
    ErrorLog /usr/local/apache/logs/error_log
    If I'm reading that right, it means all I did by commenting out the domlog part in the vritualhost section for mysite.com was move where its logs were kept? So can I safely comment out the CustomLog and ErrorLog lines above without effecting other domains on my site as long as they all have their own log entries within their virtualhost container?
     
    #1 Vatoloco, Jul 19, 2005
    Last edited: Jul 20, 2005
  2. Vatoloco

    Vatoloco Well-Known Member

    Joined:
    Jun 21, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Well, I'm going to try commenting out those two lines. I guess I'll found tomorrow after webalizer and everything runs again if other domains still keep their logs.

    If anyone knows of any bad side-effects this might cause, please let me know!

    Thanks! :)
     
Loading...

Share This Page