?
Solved

Web Logs

Posted on 2005-03-28
21
Medium Priority
?
206 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 

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

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month9 days, 13 hours left to enroll

762 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