I built a cluster at work and about a month ago I moved our users to it. It was set up using apache's dynamic virtual hosting. One problem with the virtual hosting is that you can not have different hosts log to different log files. I just used the CLF format we had used in the past for the logging. The problem is that CLF doesn't list what server was requested. So in the logfile I can tell what requests are for what servers. We bill web users based on their net usage, and there is no way tell how much to bill. Well, I sort of found a solution. We can see what the reffering page is, so we can get all all the usage one a person is on ther sight, just not their very first request (like the root index.html). S we will be missingmaybe 5% of the bandwidth from the billing.
That should have been a a5 minute perl script, but perl was not working. For dynamic virtual hosting, and directory with a domain name in the vhost directory is automatically set up as a webhost. So if I make a www.domain.com directory, the server instantly is hosting www.domain.com, but only www.domain.com. So I create a symbolic link from domain.com to www.domain.com so both hostnames have the same data and you can reach both domain.com and www.domain.com. The usage totals are generated with webalizer so the users can also see their usage in minute detail, so in ther domain their is a webalizer directory. I don't want to webalizer in domain.com and www.domain.com so I wrote a perl script to only run webalizer if the directory is real, not a symbolic link. Perl did not work. The if statement has option like "if -d directory" makes it so it onle does the stuff in the if statement id the directory is realy a directory, and "if -l directory" works if the directory is really a symolic link. But perl was claiming the symbolic links were really directories.
I had little problems like that all day long.
What should have been a 15 minute script took me from 9:30 this morning till 4:30 this afternoon.
Then I got home and spilled dinner all over the keyboard and desk and chair and carpet and then the dog walked in it and tracked it all over.
Finally, I had to go to the restroom thirty minutes ago, when leaving the bathroom I managed to hit myself on the head with the bathroom door hard enough to cut my forehead.
The best part of today... It's almost over!!!