Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Member
    Join Date
    Jun 2003
    Posts
    13

    Unhappy access to awstats to visitors

    I'd like to provide awstats for visitor or at least for clinets without their own cpanel to manage their website (I have some cheap hosting plans like these).
    Is it possible to have an address like:
    http://www.mysite.com/awstats
    instead of having to connect each time to cpanel?
    Thanks

    Andrea

  2. #2
    Member
    Join Date
    Oct 2003
    Posts
    38

    Default

    Yep - you can download and install it in your own webspace...

    Jhttp://www.awstats.net/

  3. #3
    Member
    Join Date
    Jun 2003
    Posts
    13

    Default I'll explain better

    Anthony,
    I didn't explain well what I meant.
    I've some customers but I don't want to give access to cpanel even if I created a cpanel for their site.
    I'm the only one who can access to their cpanel to add e-mail accounts, forwarders...
    I also check their webstats and I would like to allow them to see their stats WITHOUT logging to cpanel.

    Is this possible?
    Can I provide them a web address as:
    http://theirsite/awstats.pl?framename=index&lang=en
    instead of (cpanel mode)
    http://theirsite:2082/awstats.pl?fra...=index&lang=en

    I hope I've explained better what I meant!!!

    Thanks

    Andrea

  4. #4
    Member
    Join Date
    Oct 2003
    Posts
    38

    Default

    Yep - thats what I meant.

    You can install it ito your clients cgi-bin directory

    So it would be accessed like this....

    http://theirsite/cgi-bin/awstats.pl?...=index&lang=en

    I havent done it - but Ive seen it done many times on other sites

    Here is a guide I just found for you

    http://forums.dixiesys.com/index.php...opic=3216&st=0

  5. #5
    Member
    Join Date
    Sep 2002
    Posts
    8

    Default

    Is there any way of doing this if you do not have CGI access?

  6. #6
    cPanel Partner NOC cPanel Partner NOC Badge jackal's Avatar
    Join Date
    Feb 2002
    Posts
    708

    Default

    Try this and make sure you set the proper permissions on your awstats dir.
    <?
    //include("header.php");

    if($QUERY_STRING == ""){$query = "config=yourdomain.com";}else{$query=$QUERY_STRING;};

    exec("/usr/bin/curl 'http://usernameassword@yourdomain.com:2082/awstats.pl?$query'",$return_message_array, $return_number);

    for ($i = 0; $i < count($return_message_array); $i++) {
    $results = $results.$return_message_array[$i];
    }

    if($query == "config=yourdomain.com"){$results = str_replace("src=\"", "src=\"?", $results);}

    $results = str_replace("href=\"", "href=\"?", $results);
    $results = str_replace("awstats.pl?", "", $results);

    echo $results;

    //include("footer.php");
    ?>

    replace that smilie with : p
    Last edited by jackal; 12-24-2003 at 09:30 AM.

  7. #7
    Member
    Join Date
    Sep 2002
    Posts
    8

    Default

    Thank you soooo much!!! Thats perfect!!!

    Have a great Christmas + New Year!!

    James

  8. #8
    Member verdon's Avatar
    Join Date
    Nov 2003
    Location
    Northern Ontario, Canada
    Posts
    792

    Question

    Hi,

    I've tried this, and I've tried something very similar, except you can require authentication of your choosing, found here http://www.totalchoicehosting.com/he...isticspage.htm but am unable to get it to work. I don't get any errors, just a completely blank page.

    I'm not entirely sure what 'awstats dir' you are referring to when mentioning permissions though. Maybe that's the problem. I have set permissions on /../user/tmp/awstats to 'rwxr xr x'. Is this the one you meant? I am using cPanel 8.5.4-RELEASE 72 and Theme cPanel X v2.2.6.

    The stats are there when I go in via cpanel or directly to the domain.com:2082/awstats.pl?config=domain.com , just nothing is being returned by this script or the other.

    Any thoughts?

    Thanks, v

    Ps. The other script I mentioned is discussed in this thread;
    http://forums.cpanel.net/showthread....threadid=16964
    Last edited by verdon; 01-31-2004 at 10:57 AM.

  9. #9
    Member
    Join Date
    Jan 2004
    Posts
    134

    Default Security hole


    This script (the one by jackal) sends usernameassword to access awstats, but really it opens the way to cpanel!!!!

    I thinks this is a fail for security.

    Bye.

  10. #10
    cPanel Partner NOC cPanel Partner NOC Badge jackal's Avatar
    Join Date
    Feb 2002
    Posts
    708

    Default

    Hello, I did not ask you to use did I?

  11. #11
    Member
    Join Date
    Jun 2003
    Posts
    13

    Default latpanel is right!

    I would like to know if it's possible to mask username and password as it would really open the way to cpanel and I don't want anyone to access the cpanel (even the customer).

    Any reply is truly appreciated!

    Andrea

  12. #12
    Member
    Join Date
    Jan 2004
    Posts
    134

    Default Solution

    I've found a solution in Awstats site.
    1. Put awstats.pl in a access protected directory. Use links for every directory of awstats (lang, lib, plugin, images) to cpanel awstats installation.
    2. In this directory put the config files of every subdomain (I don't know why, but awstats.pl can't read cpanel awstats config files). Or you can make a link (ln -s)
    3. In the config file set:
    AllowAccessFromWebToAuthenticatedUsersOnly=1
    4. In the config files of each subdomain set the name of the allowed users:
    AllowAccessFromWebToFollowingAuthenticatedUsers="username"

    I think I didn't forget anything.

    That's all!
    Last edited by latpanel; 04-11-2004 at 12:15 PM.

Similar Threads & Tags
Similar threads

  1. Latest Visitors Stats & Raw Access Log Error
    By Giulia in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-29-2009, 04:16 AM
  2. Some visitors can only access my websites through a proxy?
    By andye in forum New User Questions
    Replies: 1
    Last Post: 08-01-2008, 05:46 AM
  3. Unique Visitors in Awstats
    By wineo in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-31-2005, 10:19 PM
  4. How to Access 'AWstats' without login in to CP...
    By billau in forum cPanel and WHM Discussions
    Replies: 4
    Last Post: 10-15-2004, 11:53 AM
  5. can't access awstats after username change
    By kualo in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-14-2003, 04:17 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube