Awstats mod - uses dynamic pages (non static)

Discussion in 'Tips/Tricks/Mods' started by djtremors, Nov 8, 2006.

  1. Ovidiu

    Ovidiu Active Member

    is this what you meant by
    ? I see no other posts mentioning changes by you, is there anything else that needs changed?

    please answer quick - I am sooooo keen on installing this, I have waited a long time for this :)
     
  2. Ovidiu

    Ovidiu Active Member

    well, I tried it and have some problems:
    I ran the cronjobs manually to test it imediately.

    on one of my sites I managed to authentificate successfully and got an 500 server error. my suexec log says:
    the apache log says:
    any help on this?
     
  3. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    The fixes I mentioned earlier in this thread are incorporated in the updated download, available from djtremors.
     
  4. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    The setup of dynamic awstats does not run with suexec, as it moves you out of the root web dir. It uses a 301 HTTP redirect. Which suexec does not allow.
     
  5. Ovidiu

    Ovidiu Active Member

    any fixes you can imagine to this? I LOVE awstats, but I'd not want to get away from suexec as well, *sigh* what a dilemma... if anyone can imagine a solution for this, pleasse post.
     
  6. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    An alternative could be to define a ScriptAlias and do some smart rewriting in the general apache2.conf.

    But someone has to make some time for this and figure it out. ;)
     
  7. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    hey all,

    I just double checked and AllowAccessFromWebToAuthenticatedUsersOnly is set to 1 and always has been in my script so I don't know how people are getting it set to 0. I knew this was an issue when I first made this small package.

    in regards to suexec, I don't run suexec as i've had issues just trying to get it working and also did it in this method due to some other issues (phpSafeMode blocks other directories and must be included in the path, too much trouble to do using install scripts to patch conf files). I might try to do the ScriptAlias method again and if I get it successful I will publish it as a separate package ("Marked as a ScriptAlias version") but I've been real busy lately.
     
  8. Ovidiu

    Ovidiu Active Member

    well you have one loyal supporter over here. I'll wait and wait until you maybe get this done :)
     
  9. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    in that case, I'll do it tonight for ya.

    Can't promise on the suexec stuff. I'll private message you on the download url and you can try it out.

    [@night] Argghhh!!! ISPC update screwed my development files of ispc-awstats.. ha ha.. lucky I have the download to install and work off..
     
    Last edited: Feb 1, 2007
  10. Ovidiu

    Ovidiu Active Member

    I have some updates on this:

    I got a report from: Cron <root@h898552> test -x /usr/sbin/anacron || run-parts --report /etc/cron.daily


    line 509,510 are these:
    any more advice?
     
  11. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    These are probably duplicate entries somewhere.
    See if there is a /icon and /ispcstats somewhere else in the file and if so, remark them out.

    My install script doesn't check if the entries exist and if you install multiple times it'll add the entries again and again.
     
  12. Ovidiu

    Ovidiu Active Member

    indeed I installed twice :-( removed the duplicate entries,
     
  13. Ovidiu

    Ovidiu Active Member

    I just NEED to revive this thread, as I am halfway stuck.

    As I am using suexec, this did not work out. In a nightly msn session with djtremors we worked through this for severall hours, but didn't finally finish it.

    I can't catch djtremors on msn again as we are roughly 12 hours apart :) but I still have the chatlogs so if someone wants to help, maybe djtremors has given this problem a thought?

    After the conversation with him we concluded it can be done, but still needs some finetuning.
     
  14. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    I don't use suexec, but I 'support' the dynamic version of AWstats in ISPConfig. Not for users to have the "Update Now" button, but the browsing through history dynamically is very important IMO.

    I'm considering to work on 6.6. I know the crontabs are incorrect (I think we can skip one run) the default of 04.00 hours interferes with webalizer (Fixed on my systems), https is not processed very well, with mod_perl2 enabled there's a bug in awstats (fixed on my systems) and I have not enabled any plugin. So yeah, I'm open to suggestions how to tackle this.
     
  15. Ovidiu

    Ovidiu Active Member

    you kind of confused me with your answer, so are you saying I can help you by sending you the chatlogs? I don't think djtremors will have any probs with this as he just helped me in the direction we need to go.

    I'll mail you the logs as soon as I get home from work, to show you what we have tried, the thing is we were so close, I could almost see it ;-) but unfortunately it was the night after my birthday and 4:00 am in the morning and I just came back from celebrating...
    I guess I wasn't at my brightest moments...
     
  16. martinfst

    martinfst ISPConfig Developer ISPConfig Developer

    Happy birthday..... :)

    Sorry for any confusion. I'm not sure if the chatlogs will help. I personally don't use suphp.
    But I do use awstats in dynamic mode, and I do have some ideas to improve. Let's see what we can come up with.
     
  17. radim_h

    radim_h Member HowtoForge Supporter

    users for awstats

    Hello guys,
    how the autentification works??,
    about month ago, when i just tried to use awstats for ispoconfig it worked well
    But now something is weird
    .htaccess points to home/admispconfig/ispconfig/web/ispc.awstats/.htpasswd
    and /.htpasswd contains following

    admin:$1$TAVCXZlv$NAjnpdNgAfPMNT********
    admin:$1$TAVCXZlv$NAjnpdNgAfPMNT********
    admin:$1$TAVCXZlv$NAjnpdNgAfPMNT********
    web14_giftvouchers:JyA8g********
    web14_info:IR1a3********
    web14_chantho:$1$mHAEatCw$sy.6ShQCg/ph5********
    web14_booking:`pFEW********I
    web15_georgev:LtDLK********
    web15_yaolan:dB701Hp********
    web15_shane:$1$OOb5/XOX$7Hxh********
    web15_djtremors:$1$exen~YnY$LAcM2BV********
    web21_flux:$1$sj[FjJFp$NlkXirJdO/1b1********
    admin:$1$TAVCXZlv$NAjnpdNgAfPMNT********
    admin:$1$TAVCXZlv$NAjnpdNgAfPMNT********

    which are some your users...
     
    Last edited: Mar 23, 2007
  18. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    Oh dear,... thats my fault. They're old passwords from my old test server which I obviously forgot to blank out before making the TGZ files. DAMN, i'll be hacked :p
    Just nuke it with

    > /home/admispconfig/ispconfig/web/ispc.awstats/.htpasswd
     
  19. radim_h

    radim_h Member HowtoForge Supporter

    one more problem with generating .htpasswd

    well, it is probably not only problem
    in crontab, there are 2 scripts
    In this one,
    0 4 * * * /root/ispconfig/php/php /root/ispconfig/scripts/shell/awstats.php

    I'm getting result:
    Warning: fopen(/var/www/ispcstats/.htpasswd): failed to open stream: No such file or directory in /root/ispconfig/scripts/shell/awstats.php on line 56

    Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/awstats.php on line 57

    Warning: fopen(/var/www/ispcstats/.htpasswd): failed to open stream: No such file or directory in /root/ispconfig/scripts/shell/awstats.php on line 127

    Warning: fwrite(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/awstats.php on line 128

    Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/awstats.php on line 129
    sh: /home/httpd/htdocs/ispcstats/awstats.pl: No such file or directory

    I changed line 56 of the script, but it still doesnt work, getting result

    Warning: fopen(/var/www/home/admispconfig/ispconfig/web/ispc.awstats/.htpasswd): failed to open stream: No such file or directory in /root/ispconfig/scripts/shell/awstats.php on line 56

    Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/awstats.php on line 57

    Warning: fopen(/var/www/ispcstats/.htpasswd): failed to open stream: No such file or directory in /root/ispconfig/scripts/shell/awstats.php on line 127

    Warning: fwrite(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/awstats.php on line 128

    Warning: fclose(): supplied argument is not a valid stream resource in /root/ispconfig/scripts/shell/awstats.php on line 129
    sh: /home/httpd/htdocs/ispcstats/awstats.pl: No such file or directory

    It is because script is going still into /var/www , but i cant find where "$path_httpd_root" is defined (i'm not good in PHP scripting...)

    And what about the line 119 of the script? can i put my own admin password there?? (i'd like to see users statistics also .) )

    Server is Running on Fedora Core6 i386
     
    Last edited: Mar 24, 2007
  20. djtremors

    djtremors ISPConfig Developer ISPConfig Developer

    Please use the updated script from the same site. Since moving to my new server I've found some stupid mistakes including using apaches DocumentRoot which was hardcoded to my server. Now it uses ISPConfigs paths which is the same on any ISPC install.

    Also, installing multiple times causes duplicates. It doesn't detect existing versions etc, so you will have to delete readded lines in crontab and httpd.conf or just extract the awstats.php file from the tgz.

    sorry about that.

    Also, in regards to the admin password. This script started off as a patch to webalizer as most people know and then due to some others wanting to be able to use both I made a copy and renamed the script so it doesn't overwrite the original.
    How the admin password works I have no idea as it appeared hardcoded but it was a rip off the original as I said. The admin hashed password is not stored anywhere else that I know of except for possibly the MySQL database but I just haven't had time to look at where to get the code and set it.
     
    Last edited: Mar 25, 2007

Share This Page