Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Intranet site running on Apache

Status
Not open for further replies.

FRAZ99

MIS
Feb 25, 2005
6
GB
Hi,

I have recently taken over looking after an intranet site. I wanted to set up a stats program to analyse the traffic that is being generated on this site. I am using a program called surf stats, and have access to AWStats and some others.
My problem is that the intanet site I am working on does not have an access_log file in the logs folder of the apache directory, meaning that I cannot use these traffic analysis tools.
I have no idea why these log files have never been generated.
Does anyone have any ideas how I can get this set up properly so that I have a log file or do you have any idea of another way in which I could analyse this intranet?

Thanks for your time.

 
If log files are not being generated, then that would indicate that logging has been either disabled, or the logs for the domain in question are being stored in another directory.

The only way to verify this is to review the httpd.conf file
 
Since you didn't say whay OS you are running apache on, I can't tell you where httpd.conf is but that is the file you will need to edit. Once you find it, make a backup copy so you can always get back to where it was working. If the directory you tell apache to put the logs doesn't exist, it will not start. First of all, there should already be some logs defined. You should see these lines in your config file:

Code:
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

You should also see a directive called "LogLevel" and this can be set to any of these, debug, info, notice, warn, error, crit, alert, and emerg. It tells apache what level of error you want in your error_log. If you have these defined, then all you have to do is tell apache where you want them. Create a /logs sub-directory in each site's webspace if you have more than one. You should see a vhost container for each site in httpd.conf. Within each vhost container add these lines:

Code:
ErrorLog /path/to/site1/logs/error_log
CustomLog /path/to/site1/logs/access_log common

For the most detail you would choose combined instead of common. If you just have one site, these last two directives will go in the "main" or "global" section. If all thise is already ther and uncommented, look for a directive called "ServerRoot". This is where apache keeps its configuration and default log directories.

 
I should mention that any time you edit httpd.conf, you need to restart apache.
 
HI,

The OS is Novell 6.0. The version of Apache is 1.3

I have had a look through my httpd.conf file and everything seems to be as you said it should be. In the logs folder I do have an error log which seems to be receiving data when errors occur(last logged 3rd August 2005). I have tried creating the access_log in the same folder but it still doesn't seem to be updating when I test. I have also restarted Apache to see if that helps.

Is there some sort of time delay between the user browsing the page and the log files being written?

Thanks for the Assistance.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top