Koozali.org formerly Contribs.org

Legacy Forums => Experienced User Forum => Topic started by: Guck Puppy on October 31, 2002, 12:26:40 AM

Title: userpanels and awstats
Post by: Guck Puppy on October 31, 2002, 12:26:40 AM
Wanting to let folks see the awstats for the sites their "hosting" on my e-smith server, I installed the userpanels rpm and the awstats rpm.

Sadly, when I give awstats access to a user via the userpanels, the list of domains (*all* the domains on the server!, but hey, I'm amongst friends on this server...) is shown, but when you click, it tries to reach

https://myserver.com/user-manager/cgi-bin/.awstats/awstats.pl

which don't exist in the filesystem at :

/etc/e-smith/web/panels/user/cgi-bin/    

(i.e. there is no .awstats folder there)

looking at the admin side :

/etc/e-smith/web/panels/manager/cgi-bin/
drwxr-xr-x    4 root     root         4096 Oct 22 16:47 .awstats

it exists. Interestingly, the only sub-directory in there... hmm...

anyway, i added a sym link - but that doesn't really work well - there are references inside awstats to images that are in http://myserver.com/e-smith-manager/ - so they'll prompt the poor user to supply the admin credentials.

Heigh ho... anyone successfully supplied awstats to users?

G
Title: userpanels and awstats "maybe howto" for 5.1.2
Post by: Guck Puppy on October 31, 2002, 03:35:06 AM
The solution...

make custom template :

make the custom path...

mkdir /etc/e-smith/templates-custom/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf

(that's a whole lot of directory making)

go to current, installed template dir...

cd /etc/e-smith/templates/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf

pretty much the entire config file is here as only 1 fragment. oh well, copy it to the custom template dir...

cp 10conf /etc/e-smith/templates-custom/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/.

edit the custom template "fragment"

pico /etc/e-smith/templates-custom/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf

look for...

# Relative or absolute web URL of all icons subdirectories.
# Default: "/icon" (means you must copy icon directories in "/mywwwroot/icon")
#
DirIcons="/e-smith-manager/awstats"

change DirIcons value to :

"../../awstats"

because we want the system to tell the browser to look "one directory up from the cgi-bin, in a directory called awstats".

expand the template :
 /sbin/e-smith/expand-template /etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf

"save the console" :

/sbin/e-smith/signal-event console-save &

(I add the & to make it complete in the background, I have a sloooowww server, and there's stuff to be done whilst that's happening.

Make the symbolic links in the "user panel" area.

cd /etc/e-smith/web/panels/user/html/
ln -s ../../manager/html/awstats

cd /etc/e-smith/web/panels/user/cgi-bin/
ln -s ../../manager/cgi-bin/.awstats .awstats

Make AWStats rebulild its config files... for your domains :
go into the server-manager, click on the AWStats "website stats" panel link, choose "click here" to confgure AWStats.
click "Save settings".

Don't forget to use the "user panels" panel to assign access to your users to AWStats.

That should be it. Bear in mind, it allows access to the stats for all your hosted websites to all users you give access.

G
Title: Re: userpanels and awstats "maybe howto" for 5.1.2
Post by: Guck Puppy on October 31, 2002, 03:46:56 AM
Guck Puppy wrote:

> make the custom path...
>
> mkdir
> /etc/e-smith/templates-custom/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf
>
> (that's a whole lot of directory making)

D'oh, instead use :

mkdir -p /etc/e-smith/templates-custom/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf

that creates all the directories at one go. (Thanks Dan Brown)
Title: Re: userpanels and awstats "maybe howto" for 5.1.2
Post by: stephen noble on October 31, 2002, 06:38:17 AM
>pico /etc/e-smith/templates-custom/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf

i'd suggest it would be better to rewite the source
and repackage

>because we want the system to tell the browser to look "one directory up from the cgi-bin, in a directory called awstats".

i'd put these files under primary


>Make the symbolic links in the "user panel" area.

this is automatic in the latest userpanel, wouldn't be surprised if you loose your links

regards
stephen noble
Title: Re: userpanels and awstats "maybe howto" for 5.1.2
Post by: Guck Puppy on November 01, 2002, 02:19:18 AM
stephen noble wrote:

> >pico
/etc/e-smith/templates-custom/etc/e-smith/web/panels/manager/cgi-bin/.awstats/awstats.conf/10conf

> i'd suggest it would be better to rewite the source
> and repackage

I'd agree wholeheartedly.

> >because we want the system to tell the browser to look "one
> directory up from the cgi-bin, in a directory called awstats".
>
> i'd put these files under primary

But what if you had particular web access password for your primary area? If you make it relative, it's more portable...?

> >Make the symbolic links in the "user panel" area.

> this is automatic in the latest userpanel, wouldn't be
> surprised if you loose your links

Hmmm... I am using e-smith-userpanel-1.0-4 ...  is there a later one that makes the links for me?

I appreciate that making links isn't the way to make these things persistent across upgrades and/or backup/restores  - and this is the first panel that has presented such issues. I hope that means most panels will be "user panel friendly" - but I suspect it just means I haven't installed much... :)

G
Title: Re: userpanels and awstats "maybe howto" for 5.1.2
Post by: Terry Brummell on April 03, 2003, 07:05:17 PM
Thank you Guck Puppy and Stephen for solving this problem which has been plauging me.  I do have one small, and I mean very small issue.  The version of AWStats I have is (5.3 (build 1.431)) by neddix.de.  My problem is this, he has added a little neddix.de graphic at the bottom of the awstats page.  When (as a user allowed via the user panel) I go and check a domains stats, it loads the complete page until the very bottom where it pops up the IE user/pass box again.  It's doing this because the user is not allowed to load that little .gif.  The only thing that doesn't show on the page is the neddix.de gif, everything else is fine.  Is there any way to solve this?

Terry
Title: Re: userpanels and awstats "maybe howto" for 5.1.2
Post by: Terry Brummell on April 03, 2003, 07:53:23 PM
OK, sort of fixed it myself.  In the template 10conf I changed the HTMLEndSection fragment with just a line of text, not calling that .gif to be displayed.  Now it works just fine.
Thanks Stephen and Guck Puppy.