PDA

View Full Version : Apache Useage Log just logs 'Combined'



Chrome Orange
01-17-2011, 09:59 AM
Hi

my Apache Useage Log just logs 'Combined' for all domains

Which files do I need to edit so that it will log properly

Thanks in advance

scsi
01-17-2011, 10:33 AM
What do you mean edit... it logs automatically when you access the website.

zEitEr
01-17-2011, 12:18 PM
Change name for logformat in

virtual_host2.conf
virtual_host2_secure.conf
virtual_host2_secure_sub.conf
virtual_host2_sub.conf
virtual_host.conf
virtual_host_secure.conf
virtual_host_secure_sub.conf
virtual_host_sub.conf

If not existed in /usr/local/directadmin/data/templates/custom/ copy them from /usr/local/directadmin/data/templates/

Line


CustomLog /var/log/httpd/domains/|DOMAIN|.log combined

SupermanInNY
12-12-2011, 03:32 AM
Old topic,. but I'm having the same problem:

# httpd -v
Server version: Apache/2.0.64
Server built: Mar 24 2011 01:00:19


The server is going through what we believe is DoS attack and we wanted to explore the log files.
To my surprise, I see the logs are showing:


server.mydomain.com:/var/log/httpd/domains # less somedomain.com.log
combined
combined
combined
combined
combined
combined
combined


There are no line details.
The error logs are more detailed:


server.mydomain.com:/var/log/httpd/domains # less somedomain.com.error.log
[Mon Dec 12 00:28:41 2011] [error] [client 85.10.204.194] Premature end of script headers: index.php
[Mon Dec 12 00:28:51 2011] [error] [client 84.108.103.209] Premature end of script headers: index.php, referer: http://www.somedomain.com/%D7%9E%D7%A7%D7%A6%D7%95%D7%A2/%D7%91%D7%A2%D7%99%D7%95%D7%AA-%D7%9E%D7%93%D7%99%D7%93%D7%94-%D7%90
[Mon Dec 12 00:28:53 2011] [error] [client 66.249.71.76] Premature end of script headers: index.php
[Mon Dec 12 00:28:56 2011] [error] [client 109.64.219.121] Premature end of script headers: index.php
[Mon Dec 12 00:28:59 2011] [error] [client 84.108.103.209] Premature end of script headers: index.php, referer: http://www.somedomain.com/ruppin?tid_1=All&studyfield=376&yearstudy=All&semester=All&profession=
[Mon Dec 12 00:29:12 2011] [error] [client 84.108.103.209] Premature end of script headers: index.php, referer: http://www.somedomain.com/ruppin?tid_1=All&studyfield=376&yearstudy=All&semester=All&profession=
[Mon Dec 12 00:29:24 2011] [error] [client 65.52.109.199] Premature end of script headers: index.php
[Mon Dec 12 00:29:59 2011] [error] [client 109.64.219.121] Premature end of script headers: index.php
[Mon Dec 12 00:30:21 2011] [error] [client 84.108.103.209] Premature end of script headers: index.php, referer: http://www.somedomain.com

and the same goes for the bytes:

server.mydomain.com:/var/log/httpd/domains # less somedomain.com.bytes
bytes
bytes
bytes
bytes
bytes



How do I make the log files show details?

I looked at the templates as suggested above:



/usr/local/directadmin/data/templates/custom # grep combine *
virtual_host2.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
virtual_host2_secure.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
virtual_host2_secure_sub.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.log combined
virtual_host2_sub.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.log combined
virtual_host.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
virtual_host_secure.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
virtual_host_secure_sub.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.log combined
virtual_host_sub.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.log combined



And also here:



/usr/local/directadmin/data/templates # grep combine *
httpd.conf:LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
httpd.conf:CustomLog logs/access_log combined
httpd.conf:# If the key is not combined with the certificate, use this
virtual_host2.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
virtual_host2_secure.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
virtual_host2_secure_sub.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.log combined
virtual_host2_sub.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.log combined
virtual_host.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
virtual_host_secure.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
virtual_host_secure_sub.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.log combined
virtual_host_sub.conf: CustomLog /var/log/httpd/domains/|DOMAIN|.|SUB|.log combined



Any pointers?

-Sup.

zEitEr
12-12-2011, 07:47 AM
Rebuild apache and rewrite configs?

ViruSzZ
03-20-2012, 05:31 AM
I just experienced the same exact issue... actually, webalizer was broken because of apache not being logging as it should.

I mean, there was only 'combined' in the log files even though everything was correctly setup per user configuration.

Then, I got an information that this server was upgraded from customapache to custombuild so I just rebuilt the apache (ver 2.2 at the time) and them ran 'rewrite_confs' and ta-da .... everything is ok.

So, am necro bumping this thread just in case someone else struggles this issue.

Out,

ViruSzZ