Sponsored Content
Top Forums Web Development How to log http 404 error to a separate log file? Post 302985578 by Don Cragun on Friday 11th of November 2016 02:33:10 PM
Old 11-11-2016
Please be MUCH more specific on what you are trying to do.
  • What operating system are you using?
  • Are you trying to write code in apache that will log 404 errors to a different log file than other errors?
  • Are you trying to read web pages served by apache and you want to create a log file of 404 errors you encountered while accessing pages?
  • What log file do you want to use?
  • ...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need to log http requests

Hi folks, I am trying to build this GUI application that will perform some http requests to a specific server. Basically I will use curl to "pretend" that it is a browser a sending an http request from a form. My http knowledge is very low, and the site is tricky, but I think if I could... (3 Replies)
Discussion started by: fundidor
3 Replies

2. Web Development

HTTP 404 Error Fetches File from Another Server

Has any seen any PHP or other scripting code that will executive on a 404 "File Not Found' error and then fetch the requested file from a different server? (0 Replies)
Discussion started by: Neo
0 Replies

3. Shell Programming and Scripting

Capture all error message in Log file and send the Log file by email

Hi I have a requirement to write a script to capture all errors in a Logfile and send the file in email. If there is any error occurred the subject of email will be ERROR , If there are no error occurred the subject of email will be SUCCESS. So I created a Log file and put the Appropriate... (2 Replies)
Discussion started by: dgmm
2 Replies

4. Shell Programming and Scripting

Saving svn log in a separate directory

Hi Folks, I have a directory at /usr/local/aa and there is other directory where I have checkout the code through svn checkout command ( /opt/app/fgh) now I can apply svn log command here as shown below $ cd /opt/app/fgh svn checkout <url> svn log shows me the log on console . please... (3 Replies)
Discussion started by: punpun66
3 Replies

5. Shell Programming and Scripting

How to grep a log file for words listed in separate text file?

Hello, I want to grep a log ("server.log") for words in a separate file ("white-list.txt") and generate a separate log file containing each line that uses a word from the "white-list.txt" file. Putting that in bullet points: Search through "server.log" for lines that contain any word... (15 Replies)
Discussion started by: nbsparks
15 Replies

6. Solaris

Log error from cron job into log file

Hi Please would it be right to log the errors from a script running in cron in the following manner: /datax/vendor/dump.sh > /datax/vendor/err.log 2>&1 (16 Replies)
Discussion started by: fretagi
16 Replies

7. Red Hat

Cant update yum what so ever [Errno 14] HTTP Error 404 - Not Found

Hello!!! I am so frustrated I'm about to snap!!! I cant hear any sound in Firefox or re-install Chrome. Every time I try to do anything with YUM inside my terminal (like update or install) I keep getting this error:failure: repodata/repomd.xml from virtualbox: No more mirrors to try. I... (2 Replies)
Discussion started by: ApacheOmega
2 Replies

8. Red Hat

HTTP/1.1 404 Not Found error in Web Server

I am running 2 jboss instances with ports 8585 and 8686 in my web server. Now trying to get header using the command curl -s --connect-timeout 360 -m 360 --head http: // localhost:8686/ then i get the following error HTTP/1.1 404 Not Found Server: Apache-Coyote/1.1 Content-Length: 0... (1 Reply)
Discussion started by: hridan
1 Replies

9. Shell Programming and Scripting

awk script to find time difference between HTTP PUT and HTTP DELETE requests in access.log

Hi, I'm trying to write a script to determine the time gap between HTTP PUT and HTTP DELETE requests in the HTTP Servers access log. Normally client will do HTTP PUT to push content e.g. file_1.txt and 21 seconds later it will do HTTP DELETE, but sometimes the time varies causing some issues... (3 Replies)
Discussion started by: Juha
3 Replies

10. UNIX for Advanced & Expert Users

Spacewalk repodata/repomd.xml [Errno 14] HTTP Error 404 - Not Found

I Configured spacwalk 2.7 and synchronized the channels as the root FS was and the server was unresponsive through gui i deleted the cache in /var/cache/rhn & /var/cache/yum and ran yum clean all on the server as well as spacewalk client i could see the following error Loaded plugins: rhnplugin... (0 Replies)
Discussion started by: James0806
0 Replies
Plack::Middleware::ErrorDocument(3pm)			User Contributed Perl Documentation		     Plack::Middleware::ErrorDocument(3pm)

NAME
Plack::Middleware::ErrorDocument - Set Error Document based on HTTP status code SYNOPSIS
# in app.psgi use Plack::Builder; builder { enable "Plack::Middleware::ErrorDocument", 500 => '/uri/errors/500.html', 404 => '/uri/errors/404.html', subrequest => 1; $app; }; DESCRIPTION
Plack::Middleware::ErrorDocument allows you to customize error screen by setting paths (file system path or URI path) of error pages per status code. CONFIGURATIONS
subrequest A boolean flag to serve error pages using a new GET sub request. Defaults to false, which means it serves error pages using file system path. builder { enable "Plack::Middleware::ErrorDocument", 502 => '/home/www/htdocs/errors/maint.html'; enable "Plack::Middleware::ErrorDocument", 404 => '/static/404.html', 403 => '/static/403.html', subrequest => 1; $app; }; This configuration serves 502 error pages from file system directly assuming that's when you probably maintain database etc. but serves 404 and 403 pages using a sub request so your application can do some logic there like logging or doing suggestions. When using a subrequest, the subrequest should return a regular '200' response. AUTHOR
Tatsuhiko Miyagawa SEE ALSO
perl v5.14.2 2012-03-15 Plack::Middleware::ErrorDocument(3pm)
All times are GMT -4. The time now is 10:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy