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.

Stats outside CPanel

Discussion in 'General Discussion' started by toma1708, Nov 11, 2002.

  1. toma1708

    toma1708 Active Member

    Joined:
    Aug 30, 2001
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Does somebody know what should I do for a client to allow him to visualize Webalizer Stats without logging into CPanel ?

    Thank you.

    Catalin
     
  2. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    Steps to access stats in cPanel without going through the control panel, and without (at your discretion) using a password.

    Create a symlink in your public folder (/public_html) to the particular stat page you want to use. This example uses webalizer and a link called stats:

    ln -s /home/yourusername/tmp/webalizer stats

    /home/youruser/tmp - chmod to 755
    /home/youruser/tmp/webalizer - chmod to 755

    Call up http://www.yourdomain.com/stats/index.html - this will pull up the webalizer stats for the site.
     
  3. corponramp

    corponramp Registered

    Joined:
    Nov 12, 2002
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    did not work for awstats

    Hello,

    I tried this for awstats but all I am getting is a directory page:

    'Index of /stats'

    Here is all I did:

    Create a symlink in your public folder (/public_html/stats) to the particular stat page you want to use:

    ln -s /home/myusername/tmp/awstats

    /home/myuser/tmp - chmod to 755
    /home/myuser/tmp/awstats - chmod to 755

    But when going to the following page does not bring up awstats:

    http://www.mydomain.com/stats/index.html

    Any help would be appreciated.

    Peter
     
  4. Annette

    Annette Well-Known Member
    PartnerNOC

    Joined:
    Aug 12, 2001
    Messages:
    445
    Likes Received:
    0
    Trophy Points:
    16
    This particular method is for webalizer only. Symlinking for AWStats in this manner will not work.
     
  5. wozza

    wozza Member

    Joined:
    Feb 14, 2002
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    webalizer stats viewed outside cpanel

    Hi
    awstats cant really be done with a symlink , cause the images are stored elsewhere and its too much involved to do that.

    webalizer stats is easy to link into a directory in a users web site, as the previous person said .
    however I think that youre leaving off the link name.

    what Ive done is create a stats directory in a users web directory
    ie : cd /home/user/www
    mkdir stats
    cd stats
    ln -s ../../tmp/webalizer webalizer
    this creates a link called &webalizer& which you can link to in a index.html in the stats directory.
    then cd ../
    chown -R user:user stats
    cd ../
    chmod -R 0775 tmp

    you can password protect the stats/ directory via the cpanel
     
  6. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    Actually for awstats there is one way that works.

    See http://stats.dgbaker.net/awstats.pl?config=dgbaker.net&lang=en

    Create a subdomain called whatever.domain.com or do the following in the /home/username/www directory.

    cd /home/user/www/whatever
    cp /usr/local/cpanel/base/awstats.pl .
    ln -s /usr/local/cpanel/base/images images
    ln -s /usr/local/cpanel/3rdparty/bin/lib lib

    The very big draw back is the copy of awstats.pl. If changes happen to the original then this one would need to be manually
    updated.

    Also the images part, because awstats looks for /images it must be at the top level directory.
     
  7. PvUtrix

    PvUtrix Well-Known Member

    Joined:
    Mar 12, 2005
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Ekaterinburg - Russia
    cPanel Access Level:
    Root Administrator
    If you server is using phpsuexec you also need to
    chown username.username images
    chown username.username lib
    and
    cd /home/username/www
    chown username.username stats

    to make it work if you're getting a 500 error.
     
  8. RickG

    RickG Well-Known Member

    Joined:
    Feb 28, 2005
    Messages:
    238
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    North Carolina
    You may want to check out www.josheli.com/vox/. Great scripts for both AWStats and Webalizer that will accomplish what you want.
     
    #8 RickG, Apr 13, 2005
    Last edited: Apr 13, 2005
  9. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    Note that my instructions were from 2-3 YEARS ago, a lot has changed since. ;)
     
  10. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    The php script looks good for awstats, but it requires that the cPanel username and password are hard-coded in the script. Putting the security issue to one side, hard coding this stuff means that if I update the password via cPanel/WHM then this script breaks. Presumably the same script could be modified to work such that the regular .htaccess-style username and password authentication is still required.
     
  11. mikesouth

    mikesouth Member

    Joined:
    Aug 10, 2005
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Im not overly fond of this particular hack for the reasons above...does anyone have a webalizer script that will read through subdomains and create an index.html in subdomain/stats?
     
Loading...

Share This Page