Apache Error Log Remove Referer
Contents |
perl -pe ‘s/\[error\]\s+\[client.*?\]\s+//; s/, referer:.*//'" See this blog No responses yet Trackback URI | Comments RSS Leave a Reply You must be logged in apache access log referer to post a comment. Search for: Archives Archives Select Month January 2015 apache referer header August 2013 March 2013 January 2013 November 2012 September 2012 May 2012 April 2012 March 2012 February
Apache Referer Check
2012 January 2012 December 2011 November 2011 October 2011 August 2011 July 2011 February 2011 January 2011 December 2010 May 2010 April 2010 January 2010 December 2009 November 2009
Delete Apache Error Log
October 2009 July 2009 February 2009 December 2008 November 2008 October 2008 September 2008 August 2008 June 2008 April 2008 March 2008 February 2008 December 2007 May 2007 April 2007 October 2006 July 2006 June 2006 May 2006 March 2006 February 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 May 2005 April apache access log format 2005 December 2004 November 2004 September 2016 M T W T F S S « Jan 1234 567891011 12131415161718 19202122232425 2627282930 Categories Business (1) General (5) Joke (14) Life (6) Science (5) Tech (98) Monthly January 2015(2) August 2013(1) March 2013(1) January 2013(1) November 2012(1) September 2012(3) May 2012(1) April 2012(2) March 2012(1) February 2012(2) January 2012(1) December 2011(3) November 2011(1) October 2011(2) August 2011(2) July 2011(3) February 2011(1) January 2011(1) December 2010(1) May 2010(1) April 2010(2) January 2010(3) December 2009(4) November 2009(1) October 2009(1) July 2009(1) February 2009(2) December 2008(1) November 2008(4) October 2008(1) September 2008(1) August 2008(2) June 2008(5) April 2008(2) March 2008(2) February 2008(1) December 2007(2) May 2007(1) April 2007(3) October 2006(1) July 2006(3) June 2006(1) May 2006(6) March 2006(1) February 2006(2) December 2005(1) November 2005(1) October 2005(5) September 2005(4) August 2005(6) July 2005(5) June 2005(2) May 2005(2) April 2005(2) December 2004(9) November 2004(6) Pages Links Meta Log in Valid XHTML XFN WordPress Site Admin | Free WordPress ThemeHongyu's weblog Copyright © 2016 All Rights Reserved .
Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss
Apache Access Log Location
the workings and policies of this site About Us Learn more about apache loglevel Stack Overflow the company Business Learn more about hiring developers or posting ads with us Server Fault Questions apache log rotation Tags Users Badges Unanswered Ask Question _ Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute: Sign up http://www.hongyu.org/wordpress/?p=307 Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top PHP Fatal Error log - referer up vote 0 down vote favorite I have the following log entry: [Thu Oct 11 01:02:03 2012] [error] [client 127.0.0.1] PHP Fatal error: Class 'Mage' not found in /var/www/foo/bar/Mage/Core/functions.php on http://serverfault.com/questions/437388/php-fatal-error-log-referer line 244, referer: http://example.com/de/checkout/cart/ Is the referer shown in this message really the HTTP referer or actually the URL where the error happend? apache-2.2 php magento share|improve this question asked Oct 11 '12 at 16:37 Alex 490622 add a comment| 2 Answers 2 active oldest votes up vote 1 down vote accepted Referer = HTTP_REFERER The referer entry in the error log really referes to the page referring to the script (HTTP_REFERER) and not the script where the error actually happend. Verification I just tried it by creating a file foo.html with a hyperlink to a file foo.php The content of `foo.php
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss http://stackoverflow.com/questions/25632128/how-to-disable-apending-of-referer-to-error-log-in-php the workings and policies of this site About Us Learn more about http://stackoverflow.com/questions/14144133/disable-query-strings-in-access-log Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. apache access Join them; it only takes a minute: Sign up How to disable apending of “referer” to error_log in PHP? up vote 1 down vote favorite PHP error logs typically look something like this: [Tue Sep 02 15:46:13 2014] [error] [client 192.168.0.105] blah, blah, ... , referer: https://192.168.0.21/blah/blah [Tue Sep 02 15:46:13 2014] [error] [client 192.168.0.105] blah, blee, ... apache access log , referer: https://192.168.0.21/blah/blee How can I get them to look like this? [Tue Sep 02 15:46:13 2014] [error] [client 192.168.0.105] blah, blah, ... [Tue Sep 02 15:46:13 2014] [error] [client 192.168.0.105] blah, blee, ... I tried $_SERVER['HTTP_REFERER']=''; but it (not surprisingly) didn't help. php http-referer error-log referer share|improve this question edited Sep 2 '14 at 20:57 asked Sep 2 '14 at 20:49 Dwayne Towell 3,9511537 In some circumstances we generate an extensive set of diagnostics to the log and EVERY line doesn't need to know the referer. –Dwayne Towell Sep 2 '14 at 20:58 seems more work removing than ignoring - yup i'm no help at all ;) –Dagon Sep 2 '14 at 21:06 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote (replying to an old question, I know, but I had to figure this out on my own recently, so maybe this will help somebody else...) This can be done by setting the 'ErrorLogFormat' directive, either in your server config or virtualhost
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Disable query strings in access log up vote 3 down vote favorite 1 Long story short, user passwords are being passed plain text via url (horrible, yes, but not my idea), and this query string is being stored in the access log, which we clearly don't want so obvious. Is there a way to prevent query strings from being stored in the access log without disabling CustomLog? apache logging share|improve this question asked Jan 3 '13 at 17:34 Angry Spartan 1,49952857 What's your current CustomLog format set to? –Joachim Isaksson Jan 3 '13 at 17:36 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common CustomLog "logs/access.log" common –Angry Spartan Jan 3 '13 at 19:08 add a comment| 2 Answers 2 active oldest votes up vote 4 down vote accepted Your common log format includes the query string in %r (first line of request) What you can do is to add a new log format (keep the old one for reference, no need to remove it) LogFormat "%h %l %u %t \"%m %U %H\" %>s %b" common_no_querystring where %m is the method (GET/POST), %U is the URL requested without querystring and %H is the HTTP version for the request. This will output the same line as %r, except the query string. Then all you need to do is change the customlog line to; CustomLog "logs/access.log" common_no_querystring and you'll no longer get query strings in the log. share|improve this answer answered Jan 3 '13 at 19:23 Joachim Isaksson 115k11133169 Damn, now that's a thorough answer! –Angry Spartan Jan 3 '13 at 19:39 add a comment| up vote 3 down vote Have a look at Custom Log Formats, specifically %U The URL path requested, not including any query string. share|improve this answer answered Jan 3 '13 at 18:19 Perleone 2,6291224 Thanks, as this is the essential info I needed. –Angry Spartan Jan 3 '13 at 19:43 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and