Solved

Apache, create logfiles for every user/domain

Posted on 2004-03-30
4
394 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Fine Tune your automatic Updates for Ubuntu / Debian
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ā€¦
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.

839 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