?
Solved

Web Logs

Posted on 2005-03-28
21
Medium Priority
?
207 Views
Last Modified: 2013-12-16
We have a red hat 9 web server, I need to know where it puts the text file containing the stats for web site hits, etc...
Can't seem to find it, but then again I am not very familiar with Linux, so please bear with me.
0
Comment
Question by:TuscolaCounty
  • 9
  • 6
  • 4
  • +1
21 Comments
 
LVL 16

Expert Comment

by:manav_mathur
ID: 13644536
Red hat 9 is a linux OS. You are probably using Apache webserver.
ALthough you can parse the logs to getthe hit count, you can also maintain scripts on your site for this purpose.


0
 
LVL 3

Expert Comment

by:drcheap
ID: 13644972
Assuming it's Apache (quite likely), the config file should be one of these:
/usr/local/apache/conf/http.conf
/usr/local/apache2/conf/http.conf

Open that file and you should find one or more of these directives:
AccessLog
ErrorLog
CustomLog

For each of those you'll also see a path/filename, and that is the logfile.  For example:

AccessLog /usr/local/apache/logs/access_log


These log files contain raw data, and will not directly provide you with statistics -- you will need some software that will analyze the logs.  My personal recommendation is AWStats:  http://www.awstats.org
0
 
LVL 16

Expert Comment

by:manav_mathur
ID: 13644995
You can manually parse through all the GET queries in your server logs to get the number of hits.

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:TuscolaCounty
ID: 13645322
Ok, I found the apache folder, it is at /usr/libexec/webmin/apache
I see no acees_log file though.
Also, I have looked at aw stats but can't figure out how to install it.
0
 
LVL 16

Expert Comment

by:manav_mathur
ID: 13645368
You have to ask your sysadmin where apache logs are kept. Or wait till somebody else comes along....

Manav
0
 

Author Comment

by:TuscolaCounty
ID: 13645400
lol, I am the sys admin. But when I got here, this server was already in place.
0
 
LVL 16

Expert Comment

by:manav_mathur
ID: 13645455
Oh...Ok!! :-)

If your system is not online right now, you can fire a command like
find / -name "httpd.conf"

But you need to show us the AccessLog entry in your httpd.conf file.

Manav
0
 

Author Comment

by:TuscolaCounty
ID: 13645474
system is online
tried to run find / -name "httpd.conf" from the "run program" option in start menu, got nothing, it just disappeared.
Looking for httpd.conf now
0
 

Author Comment

by:TuscolaCounty
ID: 13645481
using the find function from the start menu, cannot find httpd.conf
0
 
LVL 16

Expert Comment

by:manav_mathur
ID: 13645486
"find / ..." can be pretty heavy on the system
0
 

Author Comment

by:TuscolaCounty
ID: 13645532
Found it:

and found access_log here
/var/log/httpd/access_log
0
 

Author Comment

by:TuscolaCounty
ID: 13645547
ok, now that i found the access log, i want it to be placed in the web folder so i can access it via ftp.
sound stupid? Or is there another way to access it from the web?
0
 
LVL 16

Expert Comment

by:manav_mathur
ID: 13645561
You won't want to access it. A simple CGI script can be used to parse it and get the number of hits.

Manav
0
 

Author Comment

by:TuscolaCounty
ID: 13645602
i have a windows based web log parser that has an ftp function, i would like to use that.
isn't the location of the access_log set in the httpd.conf file? Can I just change that to the web site folder?
0
 

Author Comment

by:TuscolaCounty
ID: 13645994
ok, skip the windows based stats thing. On this red hat machine is some type of stats program, it is not awstats, but reports in html format.
Index page is located here file:///var/www/html/usage/index.html
Is there any way I can access this page from a browser across the net? As of now all I can do is look at it from the server itself.
0
 
LVL 12

Expert Comment

by:GinEric
ID: 13649003
/etc/apache/httpd.conf
or
/usr/local/apache/conf/httpd.conf
or
/usr/local/apache2/conf/httpd.conf

to find it use

whereis apache

or

whereis apache2

what you want is the apache sysconfdir that was either used when apache was installed or compiled.

using

ps -x

you will see where httpd daemon is running from

the logs are in something like

/var/named/log

or

/usr/local/apache2/logs

usually.

0
 
LVL 12

Accepted Solution

by:
GinEric earned 1000 total points
ID: 13649031
From the Apache config.layout file: their latest was Red Hat 7.x

#   Red Hat Linux 7.x layout
<Layout RedHat>
    prefix:        /usr
    exec_prefix:   ${prefix}
    bindir:        ${prefix}/bin
    sbindir:       ${prefix}/sbin
    libdir:        ${prefix}/lib
    libexecdir:    ${prefix}/lib/apache
    mandir:        ${prefix}/man
    sysconfdir:    /etc/httpd/conf
    datadir:       /var/www
    installbuilddir: ${datadir}/build
    errordir:      ${datadir}/error
    iconsdir:      ${datadir}/icons
    htdocsdir:     ${datadir}/html
    manualdir:     ${datadir}/manual
    cgidir:        ${datadir}/cgi-bin
    includedir:    ${prefix}/include/apache
    localstatedir: /var
    runtimedir:    ${localstatedir}/run
    logfiledir:    ${localstatedir}/log/httpd
    proxycachedir: ${localstatedir}/cache/httpd
</Layout>    

And that is where everything is.  So httpd.conf is : sysconfdir:    /etc/httpd/conf


0
 

Author Comment

by:TuscolaCounty
ID: 13652094
Thanks to all for replies, I will try to figure thios out. As of now, I am too linux ignorant to find anything. What would take me 5 minutes on a windows machine takes 2 days on this red hat server.
Thanks
0
 
LVL 12

Expert Comment

by:GinEric
ID: 13688404
Thank you TuscolaCounty

I have suggested that some standards be impelemented, among them, an info file telling where everything is; we'll see what the developers do.
0
 
LVL 3

Expert Comment

by:drcheap
ID: 13688692
GinEric,

There are standards (or at least defaults) for this stuff...they are defined by the Apache group.

<soapbox>The problem is that Red Hat likes do things their own special way.  Since it's all open source, they have that right, but still there is something to be said for following conventions.  Anyway, this is one of the reasons I do like nor use Red Hat when it comes to Linux.  Long live Slackware!</soapbox>
0
 
LVL 12

Expert Comment

by:GinEric
ID: 13690648
hehehe, I could laugh about the soapbox, but I think even Apache is going to say what I want to do is either radical or reactionary; changing not only their scripts, but changing the C and C++ compiles and compilers themselves.

C++ team is apparently working on a complete rewrite of gcc and it's probably time to let them in on the changes.

The feeling is, we can beat Red Hat, Debian, Mandrake, and all the others at their own game.

:)
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses
Course of the Month7 days, 21 hours left to enroll

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question