Log problems

Bondings

Verified User
Joined
Dec 10, 2005
Messages
6
Recently due to apache changes, the logging of raw accesses was changed on my server. It now logs all requests to the access_log instead of the seperate domain logs in .../domains/<something>.log.

Now I installed the split-logfiles from apache and it seems to be working fine, apart from the fact that the log files are named www.<something>.log instead of <something>.log. If I remove the www manually, then the logs are shown in DirectAdmin. This because the %v puts a www in front of the domain name/virtual host.

I would like to know how to make it that way that DirectAdmin (and webalizer) use the www.<something>.log version to access the logs? Or just to let apache log the non-www version?
 
Hello,

I've actually been working on a binary that will sit in memory and run just like the da-popb4smtp program. It will sit and watch the /var/log/httpd/error_log and sort out each line to the correct file in near realtime (maybe a 2 second delay). It only being designed around the error_log because that's the only log that apache actually holds open. (Reason to do this is to close all of those files and only use 1, thus reducing the number of filedescriptors on the system. Using 800+ domains can make out the system's FD limit.). Anyway, there is no eta on this, it's just a side project that get nibbled at every so often.

As for the access_log, I may be mistaken, but I believe the CustomLog format (which it uses) appends and closes the log after each write, so putting all the logs into one file shouldn't be needed. (which doesn't really answer your question).

If you actually need to do it the way you are, then what if you just create symbolic links for all the www files to the regular ones?

eg:

cd /var/log/httpd/domains
ln -s www.domain.com.log domain.com.log

for each domain.

John
 
Do you have any advice how I should handle the error_log configuration ?

On a machine I have about 1200 small domains and right now I have removed te error_log lines from virtual_host.conf.

But I do need the error logs per domain.

Please advice.
 
Nieuwhier, the solution from the DirectAdmin Support worked fine for me for the apache logs. I just still need to tweak a few things because the logs aren't handled yet by the statistics.

I don't think the solution for the error_log is as easy. However, if you would ever find one, please let me know. I'm certainly interested in it. :D
 
DirectAdmin can change the system so the error logs can be created on a per-domain basis, but doing it is beyond the ability of the average user. And it's not easy for even the best of admins.

And you won't be able to see any domain-specific logs until after the nightly cron processing.

The kernel limits the number of files you can have open at the same time. You hit the limit when apache is serving a lot of domains.

You have to make changes to the master apache configuration files to create one master access log and one master error log.

Then in the nightly cronjobs, before you run either logrotate or the statistics stuff, you run the apache splitlogs program to split the logs.

Or you can recompile your Linux or Unix kernel with higher limits for open files.

Which must be figured out carefully depending on your server, memory, processor, speed, and load.

I've already discussed this with the DA programming team and I expect it will get done at some point in the future. Write DA if you need the change :) .

Jeff
 
thx jeff.

Quote: "Or you can recompile your Linux or Unix kernel with higher limits for open files."
I have thought about this but I am a little bit scared of other problems I could run into. And its not the most 'pretty' solution I guess.... It's like adding more and more diskspace for the beautiful 'windows software' :o

System logs are not that often viewed so on-the-fly generation of the specific user errorlog is an option. Of course they have to check the errorlog throught the control panel and not the shell. I'll certainly look into this when I have the time.
 
It sits about 1/3 completed and hasn't been worked on. Issues regarding ErrorLogs havn't been as prominent as they were before.

John
 
Back
Top