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.

Addon Domain: Changing log file location

Discussion in 'General Discussion' started by Oranuf, May 28, 2016.

  1. Oranuf

    Oranuf Registered

    Joined:
    May 27, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    NY
    cPanel Access Level:
    Root Administrator
    Fairly simple question, but haven't been able to find an answer through an extensive search. Relatively new to WHM and cPanel.

    Once I create an AddOn Domain, the log files by default are ending up in ./usr/local/apache/domlogs/. However, i'd like to customize their location, and also make sure AWStats/Webalizer can find them. I don't see a place to configure this either in WHM or cPanel interfaces. Easy way to do both?

    Code:
    I have root access. System Spec:
    
    /etc/redhat-release:CentOS release 6.8 (Final)
    /usr/local/cpanel/version:11.54.0.24
    /var/cpanel/envtype:vmware
    CPANEL=release
    Server version: Apache/2.2.29 (Unix)
    Server built:   Apr  8 2015 15:10:55
    Cpanel::Easy::Apache v3.28.5 rev9999
    PHP 5.4.40 (cli) (built: May 19 2015 12:06:47)
    Copyright (c) 1997-2014 The PHP Group
    Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies
        with eAccelerator v0.9.6.1-ea, Copyright (c) 2004-2012 eAccelerator, by eAccelerator
        with the ionCube PHP Loader v4.6.1, Copyright (c) 2002-2014, by ionCube Ltd., and
        with Zend Guard Loader v3.3, Copyright (c) 1998-2013, by Zend Technologies
    mysql  Ver 14.14 Distrib 5.6.29, for Linux (x86_64) using  EditLine wrapper
    
     
  2. sarath8372

    sarath8372 Active Member

    Joined:
    Jan 6, 2015
    Messages:
    35
    Likes Received:
    5
    Trophy Points:
    8
    Location:
    Kochi, India
    cPanel Access Level:
    Root Administrator
    Domlogs are defined in Apache main configuration file : /usr/local/apache/conf/httpd.conf . Look for CustomLog defined for the domain under its virtual host entry.

    Code:
    # grep yourdomain.com /usr/local/apache/conf/httpd.conf | grep CustomLog
    You can modify the virtual host container for the domain by creating an include file as mentioned in : Modify Virtualhost Containers With Include Files - EasyApache - cPanel Documentation

    You can look for the include file path for your domain in Apache configuration by :

    Code:
    # grep yourdomain.com /usr/local/apache/conf/httpd.conf | grep Include
    Create an include file in the directory shown in the output of last command (file should end with .conf). Define your custom domlog file in the include file. Then run :

    Code:
    /scripts/verify_vhost_includes --commit
    Code:
    /scripts/ensure_vhost_includes --all-users
    If verify script returns, "OK" finally rebuild Apache configuration file :

    Code:
    /scripts/rebuildhttpdconf
     
  3. Oranuf

    Oranuf Registered

    Joined:
    May 27, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    NY
    cPanel Access Level:
    Root Administrator
    Brilliant, this all makes perfect sense. THANK YOU!!
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page