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.

persistent global awstats config changes

Discussion in 'General Discussion' started by Smitty519, Jun 27, 2008.

  1. Smitty519

    Smitty519 Member

    Joined:
    Jun 15, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I need to make some global awstats config changes that will not get wiped out by the update process. How can I do that?? I'm running cpanel 11.23.3 and whm 11.23.2.

    I'd prefer not to have to make the changes to each domain and then prevent the domain's config from updating by removing write permissions.
     
  2. Smitty519

    Smitty519 Member

    Joined:
    Jun 15, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    More information about problem

    I tried making my required changes to the domain specific config in the /home/domain-user/tmp/awstats-config file and setting its permissions to 0444. All that got me is that awstats now refuses to run. The stats log (/usr/local/cpanel/logs/stats.log) says that there was a "permission denied" trying to overwrite the config file. BTW: it would really be nice if the entries in this log were timestamped. It's almost impossible to figure out when a particular event happened. Logs without timestamps are virtually useless!

    So, I can't make changes to the domain specific config, and I can't make changes to the global config (/usr/local/cpanel/etc/awstats.conf) that won't be overwritten by the cpanel update process. How can I make changes that will allow awstats to pick up the screen resolution, color depth and misc information written to the access log by awstats_misc_tracker.js??

    This is really important information to me. I'm a photographer and I want to take full advantage of my user's browsing capabilities. One of the prime reasons for switching to cpanel from plesk was the ability to use awstats and capture this information.

    I am a cpanel customer via hostmysite.com.

    -Smitty
     
    #2 Smitty519, Jun 28, 2008
    Last edited: Jun 28, 2008
  3. RickG

    RickG Well-Known Member

    Joined:
    Feb 28, 2005
    Messages:
    238
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    North Carolina
    The way I've gotten around this ...

    - edit the main template at /usr/local/cpanel/etc/awstats.conf
    - add the following to the very last line of the file:

    Include "%AWSTATSDIR%/custom.txt"

    Next time stats are run and the /home/accountname/tmp/awstats/awstats.domainname.com.conf is recreated, it will have the "include" line at the end (which will translate to /tmp/awstats/custom.txt)

    Any directives in your include file (in this case, custom.txt) take precedence over values in the global conf file. One (major) note: you'll need to create a custom.txt file in every /home/accountname/tmp/awstats/ directory (even if blank), otherwise an error occurs when viewing stats for a particular domain.

    Hope this is of some help. Its been an effect workaround for us given the global conf file is not updated very often.
     
  4. Smitty519

    Smitty519 Member

    Joined:
    Jun 15, 2008
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the help Rick.

    I had made my changes in the global config file and after a couple of hours getting it to work right, it got wiped out the same night by an update. If they don't update it that often, I guess I can put them back in there. I really want the same behavior in each of the domains, so putting them in the global file seems like it would be easier.

    Thanks again for the response and the help.
     
Loading...

Share This Page