Results 1 to 26 of 26
  1. #1
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858

    Making your Cpanel Webalizer statistics available without cpanel login

    CPanel offers you the ability to check your website statistics with a program called webalizer. The problem with this system is that you are required to login via cpanel, and click through 2 diferent subsections in order to access them. This tutorial will guide you on the steps needed to make your webalizer statistics available via www.yoursite.com/stats/ .

    Login to your hosting account via ssh. If you do not have ssh, ask your host to enable it. if they won't enable it, ask them to read this tutorial, and run through these directions yourself.

    Navigate to your public_html directory by running the following command

    cd public_html

    Once there, type the following:

    vi .htaccess

    once that loads, hit your i key, and type the following:

    Options +FollowSymLinks

    Once that is done, hit your Esc (escape) key, and type the following:

    :wq

    This will write to the .htaccess file, and quit.

    Next, run the following command

    ln -s ~/tmp/webalizer stats

    you can replace the "stats" part of that command with name you want to use in order to access your website statistics.

    After that, run the following commands

    chmod 755 ~/tmp
    chmod 755 ~/tmp/webalizer

    now you can access www.yoursite.com/stats/ to access your webalizer statistics.


    Enjoy

  2. #2
    If i follow these instructions can i password protect the /stats/ access?
    Ty

  3. #3
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    you could stick a .htaccess file in your ~/tmp/webalizer/ with the proper code to require a valid user.

  4. #4
    ok im a complete nOOb and i cant do it...
    everythings ok till "hit your i key"...
    after that i cant even see my website till i erase the .htaccess file

    can someone show me their .htaccess file so i can see whats going wrong?

    Thank you

    Ps-im a simple webdesigner with absolutly no knowledge of ssh, im using putty on windows only to try to do this thing.

  5. #5
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    You hit your I key so you can enter insert mode in vi. After that, you will paste the following:

    Code:
    Options +FollowSymLinks
    Then, you will hit the esc key, and then type ":wq" (colon w q).

    In order for this hack to function, that's the only code you will need to put in your .htaccess . Sometimes, that httpd option is included in the server-wide configuration. If you already have data in your .htaccess, you will need to simply add that to the top of your .htaccess .

  6. #6

    followed but simply doesn't work

    Hi
    I've followed the instructions, and sure enough, when I ftp in I see the new "stats" directory under public_html but it is not "clickable", it's chmod' to 777 and I cannot change the permission, cannot access domain.com/stats either. I do have the .htaccess file with the correct line in it, all went as described other than the fact that ... it simply doesn't work! Any thoughts or troubleshooting tips???
    Kenneth LaVoie - owner www.centralmaineweb.com
    Professional web design, hosting and search engine optimization for small businesses.

    "Delivering such excellence you wouldn't dream of being without us"

  7. #7
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    What error does it return?

    Did you make sure to chmod 755 your tmp directory?

  8. #8

    solved

    well I solved it another way - see below: I set my accounts up so that you cannot ssh so I have to ssh into root. What was happening is that BECAUSE I was logged into server as root instead of user name of account I was creating the symlink for, it wasn't working. Now this fix below worked great except when I tried to do it to my "main" site, the site which is also the name of the server. I inadvertantly chmodd'd my ROOT tmp to 755 FROM 777 bringing half the php and mysql stuff on my server to a halt!! hehehe. Ok, here's what DID work for me:

    Log into root

    cd /home/username/www
    ln -s ../tmp/webalizer stats
    chown username.username stats
    cd ../tmp
    chmod 755 ./
    chmod 755 ./webalizer
    Kenneth LaVoie - owner www.centralmaineweb.com
    Professional web design, hosting and search engine optimization for small businesses.

    "Delivering such excellence you wouldn't dream of being without us"

  9. #9
    Hi..

    It's not working for me

    I did this (as I too log in as root):

    Logged into root

    cd /home/username/public_html
    ln -s ../tmp/webalizer stats
    chown username.username stats
    cd ../tmp
    chmod 755 ./
    chmod 755 ./webalizer

    but when I go to /stats I just get a 404 saying: You don't have permission to access /stats on this server.

    any ideas what I've done wrong?

    The /tmp and /webalizer directories are showing chmod as 755
    and the /stats link is showing 777

    thanks..

  10. #10
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    try and chown username:username /home/username/public_html/stats

  11. #11
    Join Date
    Aug 2002
    Location
    here
    Posts
    1,568
    put a / on the end of stats. Like http://domains.com/stats/
    Nice tut ub3r
    /me tips hat
    Dave

  12. #12
    sorry guys... that doesn't work either still getting the same error message...

  13. #13
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    Did you put the Options +FollowSymLinks bit into your .htaccess ?

  14. #14
    Yep... I added it manually to the end of the .htaccess file
    Does it need to be at the beginning? or does it not matter?

    It seems as though its trying to get there as its not showing the page not found page, but rather saying I don't have permission to view it :-/

  15. #15
    Hi All

    this way worked for me... and you are able to password protect the directory too

    cd /home/user/www
    mkdir stats
    cd stats
    ln -s ../../tmp/webalizer webalizer
    cd ../
    chown -R user:user stats
    cd ../
    chmod -R 0775 tmp

  16. #16
    Join Date
    Jun 2003
    Posts
    56
    How do I make it work for Subdomains and so forth?

    Done it for the main account

    Also how can I protect the stats, for its appropriate users?
    Im unsure how to do htaccess files.

    Thanks

  17. #17
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    Same steps as before, just symlink it to the subdomain's folder in ~/tmp/webalizer/sub.domain.com

  18. #18
    Join Date
    Jun 2003
    Posts
    56
    Thanks heaps, but I dont know how to Symlink

    Also what about addon domains?

    I tried to make an addon domain work by this:
    "cd public_html" and then "cd addondomainname" to get into that directory then everything else the same but it just gives me the main sites stats again (As the addon domains and subdomains are all under the main site) instead of the proper website stats..any ideas?

  19. #19
    Join Date
    Apr 2005
    Location
    -=heaven=-
    Posts
    33
    I have my own way if you don't have access to ssh. I don't know with you but it works with me.
    - setup a subdomain, eg. stats.
    - setup a redirection for above subdomain,
    + for webalizer, put "http://www.yourdomain.com:2082/frontend/x/stats/webalizer.html"
    + for awstats, put "http://www.yourdomain:2082/frontend/x/stats/awstats.html"

    Change "yourdomain" to your actual domain.
    Without quotes.

    CMIIW.
    SepedaTua is here!

  20. #20
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    Quote Originally Posted by SepedaTua
    I have my own way if you don't have access to ssh. I don't know with you but it works with me.
    - setup a subdomain, eg. stats.
    - setup a redirection for above subdomain,
    + for webalizer, put "http://www.yourdomain.com:2082/frontend/x/stats/webalizer.html"
    + for awstats, put "http://www.yourdomain:2082/frontend/x/stats/awstats.html"

    Change "yourdomain" to your actual domain.
    Without quotes.

    CMIIW.
    but then they aren't accessable to the public.

  21. #21

    your right

    Your right plus it does not open a new window.
    I hate that.

  22. #22
    Join Date
    Mar 2004
    Location
    Arizona
    Posts
    91
    hey uber - any way to make this change server-wide and as default for new accounts?

  23. #23
    Join Date
    Dec 2002
    Location
    chica go go
    Posts
    11,858
    You might be able to add the symlink into the skel dir. I'm not sure, never tried that. Seems like a bad idea, because some people wouldn't want their stats to be available to the public.

  24. #24
    Join Date
    Sep 2004
    Location
    New York
    Posts
    78
    Quote Originally Posted by eLight
    Hi All

    this way worked for me... and you are able to password protect the directory too

    cd /home/user/www
    mkdir stats
    cd stats
    ln -s ../../tmp/webalizer webalizer
    cd ../
    chown -R user:user stats
    cd ../
    chmod -R 0775 tmp
    That worked for me

    Thanks for the instructions..

  25. #25
    Join Date
    Jun 2006
    Location
    Indonesia
    Posts
    59
    thank you...
    it works just fine
    ~ Ganbareee

  26. #26
    Sorry to revive such an old thread but is there a way to accomplish this on a shared hosting account that JailShell will not allow the use of the ln command?

Posting Permissions

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