Custom Logging and Separation of Logs.

cryptodan

Verified User
Joined
Oct 10, 2008
Messages
75
I think that if you do the custombuild option that anyone should be able to make changes to their httpd.conf file, and the files be saved the way you want them. I shouldn't have to be tasked with making a new template to accomplish what I want to make my logging files cleaner from this:

Code:
89.165.52.166 - - [24/Oct/2008:13:30:13 -0500] "GET /images/darkfantasy/misc/w3ccss.gif HTTP/1.1" 200 458 "http://www.cryptodan.com/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3"
89.165.52.166 - - [24/Oct/2008:13:30:51 -0500] "GET /memberlist.php? HTTP/1.1" 200 6741 "http://www.cryptodan.com/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3"
89.165.52.166 - - [24/Oct/2008:13:30:52 -0500] "GET /images/darkfantasy/misc/navbits_finallink_ltr.gif HTTP/1.1" 200 687 "http://www.cryptodan.com/memberlist.php?" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3"
89.165.52.166 - - [24/Oct/2008:13:30:53 -0500] "GET /cron.php?rand=1224873051 HTTP/1.1" 200 373 "http://www.cryptodan.com/memberlist.php?" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3"

to this which is so much more professional looking:

Code:
www.cryptodan.com c-68-32-173-79.hsd1.md.comcast.net - - [29/Aug/2008:16:28:31 -0500] "GET /images/smilies/rolleyes.gif HTTP/1.1" 200 1057
www.cryptodan.com c-68-32-173-79.hsd1.md.comcast.net - - [29/Aug/2008:16:28:31 -0500] "GET /images/smilies/redface.gif HTTP/1.1" 200 1062
www.cryptodan.com c-68-32-173-79.hsd1.md.comcast.net - - [29/Aug/2008:16:28:31 -0500] "GET /images/smilies/biggrin.gif HTTP/1.1" 200 1052
www.cryptodan.com c-68-32-173-79.hsd1.md.comcast.net - - [29/Aug/2008:16:28:31 -0500] "GET /images/smilies/cool.gif HTTP/1.1" 200 1063
www.cryptodan.com c-68-32-173-79.hsd1.md.comcast.net - - [29/Aug/2008:16:28:30 -0500] "GET /cron.php?rand=956081 HTTP/1.1" 200 43
www.cryptodan.com c-68-32-173-79.hsd1.md.comcast.net - - [29/Aug/2008:16:28:32 -0500] "GET /images/smilies/eek.gif HTTP/1.1" 200 1065
www.cryptodan.com c-68-32-173-79.hsd1.md.comcast.net - - [29/Aug/2008:16:28:32 -0500] "GET /images/icons/icon9.gif HTTP/1.1" 200 1058

Code:
s34.strefa.com http://www.cryptodan.com/showthread.php?t=16 -> /images/darkfantasy/statusicon/post_old.gif
crawl-66-249-66-8.googlebot.com - -> /showthread.php
218.27.148.66 http://www.cryptodan.com/index.php -> /index.php
218.27.148.66 http://www.cryptodan.com/index.php -> /
80.96.191.144 http://www.cryptodan.com/ -> /index.php
80.96.191.144 http://www.cryptodan.com/forumdisplay.php?f=8 -> /forumdisplay.php
80.96.191.144 http://www.cryptodan.com/forumdisplay.php?f=9 -> /forumdisplay.php
80.96.191.144 http://www.cryptodan.com/register.php -> /register.php
80.96.191.144 http://www.cryptodan.com/register.php -> /register.php
80.96.191.144 http://www.cryptodan.com/register.php -> /image.php
80.96.191.144 http://www.cryptodan.com/register.php -> /register.php

Code:
[Wed Sep 10 10:12:16 2008] [error] [client 211.90.248.97] client denied by server configuration: /home/cryptodan/public_html/, referer: http://www.cryptodan.com/forumdisplay.php?f=22
[Wed Sep 10 10:12:16 2008] [error] [client 211.90.248.97] client denied by server configuration: /home/cryptodan/public_html/errordocs/403error.html, referer: http://www.cryptodan.com/forumdisplay.php?f=22
[Wed Sep 10 10:12:18 2008] [error] [client 211.90.248.97] client denied by server configuration: /home/cryptodan/public_html/showgroups.php, referer: http://www.cryptodan.com/showgroups.php?
[Wed Sep 10 10:12:18 2008] [error] [client 211.90.248.97] client denied by server configuration: /home/cryptodan/public_html/errordocs/403error.html, referer: http://www.cryptodan.com/showgroups.php?
[Wed Sep 10 10:12:21 2008] [error] [client 211.90.248.97] client denied by server configuration: /home/cryptodan/public_html/, referer: http://www.cryptodan.com/showgroups.php?
[Wed Sep 10 10:12:21 2008] [error] [client 211.90.248.97] client denied by server configuration: /home/cryptodan/public_html/errordocs/403error.html, referer: http://www.cryptodan.com/showgroups.php?

Code:
privat-4f8ede7a.gavlenet.com Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1
privat-4f8ede7a.gavlenet.com Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1
privat-4f8ede7a.gavlenet.com Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1
privat-4f8ede7a.gavlenet.com Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1
privat-4f8ede7a.gavlenet.com Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1
privat-4f8ede7a.gavlenet.com Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1
privat-4f8ede7a.gavlenet.com Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1
privat-4f8ede7a.gavlenet.com Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1
privat-4f8ede7a.gavlenet.com Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1
privat-4f8ede7a.gavlenet.com Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.9.0.1) Gecko/2008072820 Firefox/3.0.1

Now what do you think looks better? Them all combined or them separated so you only have one file to look at with a whole lot less garbage to help diagnois issues, and see separate things. I like things nice and tidy and not full of useless junk.

Agent Strings should go into Agents, Referrers should go in referrers, errors should go in errors, and accesses should go into access.logs. To me the combined logging functions of Apache as setup by DirectAdmin turns them into a convaluted mess of chaos.

I should be able to add options to my logging functions, and they should be kept instead of over written each time by DirectAdmin. Whatever happened to manually editing your config files externally and via command line? I am a power user not a newbie, but I cannot do what DirectAdmin did for me and that is save me time and energy in setting up a hosting company.

So can we please allow this?
 
Hello,

Are you referring to customizations the per-user httpd.conf templates (virtual_host2.conf, etc).. or the main httpd.conf files located in /etc/httpd/conf ?

Note that if you want to insert any apache configs to a domains virtualhost you can do so with this:
http://help.directadmin.com/item.php?id=3
this is safe because it uses the templates system correctly to insert it, so is included for each rewrite.

The templates system can essentially do anything you can think of however it cannot accomplish every single possiblity out of the box by default. That's why it's a template, so people can change it however they'd like.

John
 
Hello,

Are you referring to customizations the per-user httpd.conf templates (virtual_host2.conf, etc).. or the main httpd.conf files located in /etc/httpd/conf ?

Note that if you want to insert any apache configs to a domains virtualhost you can do so with this:
http://help.directadmin.com/item.php?id=3
this is safe because it uses the templates system correctly to insert it, so is included for each rewrite.

The templates system can essentially do anything you can think of however it cannot accomplish every single possiblity out of the box by default. That's why it's a template, so people can change it however they'd like.

John


Yes I am talking about /usr/local/diradmin/data/users/username/httpd.conf file.

A simple switch lock_config_files=yes would be nice, and an install option of Would you like to allow DirectAdmin to setup Custom Options such as logging or would you like to do it?
 
I really wished that you could make manual edits to your httpd.conf file on a per user basis and that they would be saved without DirectAdmin making changes to it and over writing your customizations. That is the only thing I dislike about DirectAdmin. Please bring this feature about, so that we advanced users can configure custom logging directives and have them saved without DirectAdmin over writing them. It is frusterating.
 
I really wished that you could make manual edits to your httpd.conf file on a per user basis and that they would be saved without DirectAdmin making changes to it and over writing your customizations.

You can to some degree using the Admin Level
 
I like doing things manually via SSH and using vi, but whenever I make a change to my httpd.conf file and add another domain to my admin account it gets over written, and that is intolerable.
 
Back
Top