Subdomains and combined logging


I’m a new DH member and I’m just trying to get a feel for the set up options I have available.

I’ve been running my own server (Apache 2/Win2K) literally from my basement, so I’m used to having total access to the system.

I’m trying to mimic the operation of my home server.

I have a registered domain host that allowed for subdomain redirects. All of my data was stored in one Apache server directory tree. Subdomains were referenced from subdirectories in my main server root.

Now, I’ve planned on adding a few subdomains to my account, but how everything is stored and logged is of interset to me.

I’ve run through the discussion forum and KB and it seems that in order to reference my domains as subdirectories I would fully host the subdomain here and select the subdirectory from my main site as the root directory for the subdomain.

That should do nicely for what I want, but it seems that the subdomain logs are seperate from the root domain logs. I’d like all data and traffic for the domain and its subdomains to be combined.

I suppose what I want to know (assuming I have the set up correct) is: can the domain and subdomain logs be combined.

As I understand things, the logs would be seperate, even if the directory trees can be shared among them. I’m planning to download and run the logs through Webalizer (and then drop the results back on the server), but I want to minimize the number of files I need to grab.

(I suppose, if I get the script to pull one set of logs, I could always set it to pull sets of logs and combine them locally.)

That’s the behavior I want and I have been used to for the last five years.

Thanks for any tips or pointers to relevant articles.



You could always set up a daily cron job on the server to combine the logs into one big file. Something like:


DOMAINS=ls ${HOME}/logs

for domain in ${DOMAINS}; do
cat ${HOME}/logs/${domain}/http/access.log >> ${HOME}/combined.log

exit 0
[/code]… should do the trick.

If you want useful replies, ask smart questions.


Thanks for the script.

I’m not as comforatble working on the Linux side as I am on my local Windows box. I haven’t worked with a Unix-variant for over ten years.

But I was thinking of something effectively similar, but running a script to grab the logs and post process them on a local box, then upload the results back to my account here.

I just wanted to see if the logs could be combined natively.

Not a huge issue.

I just need to see if Webalizer handles non-sequential log records, or if I need to interleave the files. [Ugh!]

Thanks for the quick reply.