Solved

Apache, create logfiles for every user/domain

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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.:
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.

705 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

17 Experts available now in Live!

Get 1:1 Help Now