LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-23-2015, 11:01 AM   #1
Aeolustw
Member
 
Registered: Jun 2009
Location: Taiwan
Distribution: Linux Debian (or CentOS)
Posts: 49

Rep: Reputation: 1
How to get the same apache error log of Debian 8 like Debian 7?


I have two server and use "LogLevel info" in these two /etc/apache2/apache2.conf ,and also have the same default "LogFormat"
like these:
Code:
LogFormat "v:p h l u t \"r\" >s O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
but /var/log/apache2/error.log are different in these two server:
Debian 7 -- Linux 3.2.0-4-amd64 #1 SMP Debian 3.2.68-1+deb7u3 x86_64 GNU/Linux
Apache version 2.2.22
Quote:
[Wed Sep 23 20:29:20 2015] [error] [client 42.75.41.54] File does not exist: /var/www/999
Debian 8 -- Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u3 (2015-08-04) x86_64 GNU/Linux
Apache version 2.4.10
Quote:
[Wed Sep 23 20:28:00.426214 2015] [core:info] [pid 1649] [client 42.75.41.54:25993] AH00128: File does not exist: /var/www/html/999
Is it possible to edit something of Debian 8 and get the same apache error log like Debian 7?

Thanks.

Last edited by Aeolustw; 09-23-2015 at 11:20 AM.
 
Old 09-23-2015, 02:04 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,609

Rep: Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802
Quote:
Is it possible to edit something of Debian 8 and get the same apache error log like Debian 7?
I'm afraid no
apache-2.4 uses the new ErrorLogFormat directive to define the error_log format
According to the documentation, the closest to apache-2.2 error_log you can get, is by using:
Code:
ErrorLogFormat "[%t] [%l] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"
If you want to suppress also the AH00128 message, you need to recompile core.c

Regards
 
1 members found this post helpful.
Old 09-23-2015, 07:56 PM   #3
Aeolustw
Member
 
Registered: Jun 2009
Location: Taiwan
Distribution: Linux Debian (or CentOS)
Posts: 49

Original Poster
Rep: Reputation: 1
I got it.
Quote:
apache-2.4 uses the new ErrorLogFormat directive to define the error_log format
Thanks for the quick and useful reply.
I care about this change, because i used iptables to drop some ip with catching logs.
To editing my customized iptables shell is my hard work now.

Last edited by Aeolustw; 09-23-2015 at 08:05 PM.
 
Old 09-24-2015, 01:50 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 12,609

Rep: Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802Reputation: 1802
Quote:
Originally Posted by Aeolustw View Post
I got it.

Thanks for the quick and useful reply.
I care about this change, because i used iptables to drop some ip with catching logs.
To editing my customized iptables shell is my hard work now.
You could use fail2ban for this

Regards
 
1 members found this post helpful.
Old 09-24-2015, 09:15 AM   #5
Aeolustw
Member
 
Registered: Jun 2009
Location: Taiwan
Distribution: Linux Debian (or CentOS)
Posts: 49

Original Poster
Rep: Reputation: 1
Thanks for your good advice, i will figure it out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange log entries in apache log under debian... hacking tentative ? strelok Linux - Security 4 11-11-2009 07:55 AM
error installing php on debian with apache parf Debian 3 11-08-2007 10:36 PM
Debian + Apache + PHP + MySQL.so = Error critical Linux - Software 4 08-04-2005 05:18 AM
installing apache on debian, apt-get error omac Linux - Newbie 4 01-27-2002 02:15 AM
Installing Apache on Debian, apt-get error omac Linux - Software 2 01-24-2002 11:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration