[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Webalizer with FrontPage - Need a package



Warning: This is going to be long. Listings and files attached. Delete now
if you're not interested.

I simply don't see what the problem is with Webalizer and FrontPage.
This customer is going to be leaving soon, so I don't have any real problems
with using his site as an example:
http://www.shema-israel.com/webstats
Yes, this site is maintained with FrontPage.

As you can see, even after migrating the sites last month and carrying over
the old stats, everything works fine. Every night, every month.

Here's a listing of his /webstats directory:
[admin admin]$ cd /home/sites/www.shema-israel.com/web/webstats
[admin webstats]$ ls -la
total 507
drwxr-xr-x   2 nobody   site15       1024 Feb  2 04:13 .
drwxrwsr-x  17 nobody   site15       2048 Jan 19 08:38 ..
-rw-rw-r--   1 nobody   site15      17593 Feb  6 04:13 ctry_usage_200012.gif
-rw-r--r--   1 nobody   site15      19032 Feb  6 04:13 ctry_usage_200101.gif
-rw-rw-r--   1 nobody   site15      16241 Feb  6 04:13 ctry_usage_200102.gif
-rw-rw-r--   1 nobody   site15      33279 Feb  6 04:13
daily_usage_200012.gif
-rw-r--r--   1 nobody   site15      32879 Feb  6 04:13
daily_usage_200101.gif
-rw-rw-r--   1 nobody   site15      23888 Feb  6 04:13
daily_usage_200102.gif
-rw-rw-r--   1 nobody   site15      26973 Feb  6 04:13
hourly_usage_200012.gif
-rw-r--r--   1 nobody   site15      24267 Feb  6 04:13
hourly_usage_200101.gif
-rw-rw-r--   1 nobody   site15      18515 Feb  6 04:13
hourly_usage_200102.gif
-rw-rw-r--   1 nobody   site15       4865 Feb  6 04:13 index.html
-rw-rw-r--   1 nobody   site15      19377 Feb  6 04:13 usage.gif
-rw-rw-r--   1 nobody   site15     101410 Feb  6 04:13 usage_200012.html
-rw-r--r--   1 nobody   site15      99330 Feb  6 04:13 usage_200101.html
-rw-rw-r--   1 nobody   site15      55878 Feb  6 04:13 usage_200102.html
-rw-rw-r--   1 nobody   site15        106 Feb  6 04:13 webalizer.hist

Everything is owned by nobody. The webstats folder itself is owned by
nobody. There is no .htaccess file; there's never been one.
Hence there's no problem with an .htaccess file.

Here's my webalizer.pl file: note the entire section about the .htaccess has
been commented out so that it doesn't put in that stupid file that causes so
many problems; I also have changed the directory from /stats to /webstats
just so people who know we use Webalizer can't go merrily browsing through
the /stats folder to see what's there:

# Where sites on a RaQ3 live
$prefix = "/home/sites";
# Status messages
my $messages;

chdir "$prefix" or die "Can't cd to $prefix??: $!\n";
opendir THEROOT, $prefix or die "Couldn't open $prefix?: $!\n";
@allsites = grep !/^\.\.?$/,  readdir THEROOT;

foreach $asite (@allsites)
{  
  if (-l "$asite")
  {
    $webpath = "$prefix/$asite/web";
    $thepath = "$prefix/$asite/web/webstats";

    # Get the group id of the directory
    my $gid = (stat $webpath)[5];
    my $name = (getgrgid $gid)[0];

    # Create a directory /web/stats if it isn't there yet
    if (!-d $thepath)
    {
       mkdir $thepath, 775; 
       chown 0, $gid, $thepath;
       chmod 0755, $thepath;
    }

# Create a .htaccess if it isn't there yet
#
#    if (!-e '$thepath/.htaccess')
#    {
#       my $string = "#Access file\norder allow,deny\nallow from all\nrequire group $name\nAuthname WebStats\nAuthtype Basic";
#       open HTACCESS, qq(>$thepath/.htaccess);
#       print HTACCESS $string;
#       close HTACCESS;
#       chmod 0744, qq($thepath/.htaccess);
#    }
#
    # Now just run webalizer
    $messages .=
       `webalizer -n $asite -s $asite -r $asite -q -T -o $thepath $prefix/$asite/logs/web.log`;
    # Now change ownership of stats files for siteadmin
    $messages .= `chown -R nobody:$name $thepath`;
  }
}


All I have done is:
1. Change the stats directory to /webstats - no need for that, just my own reasoning.
2. Comment out the .htaccess section - if it's going to cause problems, don't have the damn thing
3. Change the ownership of the stats file to 'nobody' so that they don't cause p
roblems with FP.

I've been really hesitant to put in plain english that my clients' stats are
in /webstats, simply because I named the folder that for the express purpose
of people not knowing where to go looking. But I've seen so many complaints
on this entire Webalizer/Frontpage mess that I can't stand it anymore, and
so I'm putting up that info so that you guys can see for yourselves that
what I've been telling you *works*. Real-world examples.

As for password-protecting the stats directory, all I can say is... why?  If
no one knows where the damn directory is, how are they going to find it? The
only way they're going to know where the directory is, is if the webmaster
puts a link to the thing and advertises it. And if he advertises it, then he
must want people to go look at his stats!

People, this is not some mysterious magical 'act of god' that happens every
morning at 4am and every month. It's a simple CGI file. That's it. If you're
having problems, CHANGE THE FILE.


I may not have a Linux background, but I am learning. For the things that I
don't have time to learn or that I must do *now* before learning, I hire
someone to do it for me. There are plenty of people on this list that will
do these necessary changes for you for a small fee if you can't do them
yourself for whatever reason.

However, I do have a very *strong* webmastering background. So when
something's not going right in the sites on my server and it has to do with
something web-related (like CGI files or PHP files or even FrontPage and
other WYSIWYG pieces of crap as opposed to the innerworkings of
Linux/Apache), then I can fix it. Or I can at least try.

I can understand how the Linux gurus on the list get so aggravated with the
newbies like me who don't yet grasp the intricacies of a world outside of
Windows. (<g>)
But what I cannot understand is why people think that they can just plug in
a server and suddenly become a webhost when they know *nothing* about how to
maintain a website. How can you help your clients with CGI if you don't know
anything about it?  How can you administer MySQL databases if you don't know
the first thing about them? How can you tell your customers how to drop an
.htaccess file into their directory if you've never done it and don't know
how it works? How can you help a customer with FrontPage if you've never
touched the program and don't know how it works?

You would not buy a strip mall and lease out space to stores if you didn't
know how to adjust the heat, flip the power breakers on/off, repair simple
things like broken door hinges. If you hired someone to come do those little
things for you each time you needed the heat adjusted, you'd be bankrupt
before 3 months was out. Sure, hire someone to fix the ductwork or wire up a
security system - but to flip the light switch on?

In the same vein,  you can't just toss open a server and take people's money
for hosting their web sites - very likely a source of income for them and if
not, then a very dear personal possession - without knowing what goes into
making and maintaining a website. You are *taking their money* and saying
that YOU - yes, little old you - have enough knowledge about building,
expanding, and maintaining a website that you can confidently give them a
home for theirs.

I don't have any experience yet with ASP. So you know what? I don't offer it
to my clients.
Yeah, it's on my RaQ4r - whoopee. That doesn't give me carte blanche to lie
to my customers and tell them that I have the knowledge and ability to
support their ASP web site when I don't know a damn thing about it.  How
many of you RaQ4 owners out there are offering up the Chilisoft ASP to your
customers, and figuring you'll wait until someone actually needs to use it
before you learn anything about it?

Okay, so now - how many of you RaQ owners are putting server-wide CGI files
like Webalizer onto your machine - things that will affect each and every
site on your server, especially FrontPage sites if you don't make changes to
the webalizer configurations - and you don't know the first thing about
CGI?!?!?

Something to think about.

I'm just pissed because for so many years, as a client, I was a victim of so
many people who didn't have the slightest CLUE about running a website, yet
they were more than happy to take my money and have my sites on their
servers.
And here on this list, I see so many of those people all over again...
get-rich-quickers who's ONLY reason for being a webhost is because someone
told them they can make a lot of money doing it...
Why don't we start a rumor that you can open up shop as a doctor and make
lots of money - no knowledge required?

Feel free to blast me for my lack of server administration knowledge - I
readily admit when I don't know something or when I'm wrong. There's no 'pot
calling the kettle black' here. But this whole thing with people taking
someone else's money for web site hosting and they can't even fix a CGI file
or don't know what an .htaccess file is, or who've never written ten lines
of raw HTML... it just boggles my mind.
<end rant>


Carrie Bartkowiak - who ain't in it for the money (said in her 'born-n-bred
in Maryland' accent)