Solved

Apache, create logfiles for every user/domain

Posted on 2004-03-30
4
392 Views
Last Modified: 2008-03-06
Hello,

I have a server using "confixx" as an web-interface for managing user accounts.
It generally created logfiles for every domain in the users directory "/home/www/webX/log/access_log" but since I did an backup it's not creating them any more.
I must say that the config files of apache and confixx-hosts are the same as the previous.
The directory log has enough user-rights and for "web1" the logfiles are working very well, not for the other users.

My question is, where is this problem to solve and how to tell apache or confixx to do this logfiles?
I need them not only for webalizer, the web-traffic of every user is being calculated by using this logfiles.

Thanx
j79

0
Comment
Question by:j79
4 Comments
 
LVL 2

Expert Comment

by:coatesg
ID: 10722627
I assume you are using virtualhosts here given the "domain" comment? If so you need to make sure that in httpd.conf (or an included file thereof) there are lines defining the error and access log locations within each <VirtualHost> section.

For example, my VirtualHost sections contain something along the lines of:

    ErrorLog logs/domain.name-error_log
    CustomLog logs/domain.name-access_log combined

(for Apache 2 on RedHat 8)

A backup shouldn't change anything on the server - it should just make a copy of all you've told it to...

If you are after per-directory logging, then it *may* be possible using apache, but I've never done it. Alternatively, you could get the log analysis tool to work from one file, and parse the results that way. Certainly analog can do this (and pretty much anything else in fact).

Never used confixx either so can't comment on that one, but am assuming all it does it creates the VirtualHost sections for you within the Apache configuration?


0
 
LVL 2

Accepted Solution

by:
j79 earned 0 total points
ID: 10728333

Hello coatesg,

thank you for your answer.
I know "CustomLog" of apache but in this case confixx is doing the logfiles automatically by using all domains of the database.
Anyway, I solved the problem by looking the functions of confixx in deep and came to the conclusion that confixx is splitting the apache main logfile and copying them into the custom logfiles of the users.

The procedure in this case is done by using symbolic links in:
/var/log/httpd/confixx/domains/access
like: www.mydomain.com -> /home/www/web**/log/access_log

Confixx has an counterscript running every some minutes by crontab to do this.
So defining anything in the httpd.conf with "CustomLog" would make me more work than because in that case I would have to look the changes done by my clients nearly every day to log/not log the correct traffic.

j79

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Is this bug still active in RHEL 2 50
Best way to virtualise a remote Linux server 2 52
Backup & Restore 3 47
Can't ping New Linux Servers 40 28
In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

863 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

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now