Re: Clean OpenBSD's httpd logs
On Fri 1.Jul'16 at 7:39:13 +, Stuart Henderson wrote: > On 2016-06-30, C. L. Martinez wrote: > > Hi all, > > > > Sorry if this question sounds stupid, but how can I avoid this type of > > entry in OpenBSD's httpd access.log: > > > > 172.22.55.1:44710 -> 172.22.55.10, /favicon.ico (404 Not Found), [/] > > [/favicon.ico] > > Untested, but in theory: set a location that matches the favicon.ico file and > disable logging (e.g. "no log") in that location block. > Perfect!!! .. Works like a charm. Many thanks Stuart. -- Greetings, C. L. Martinez
Re: Clean OpenBSD's httpd logs
On 2016-06-30, C. L. Martinez wrote: > Hi all, > > Sorry if this question sounds stupid, but how can I avoid this type of entry > in OpenBSD's httpd access.log: > > 172.22.55.1:44710 -> 172.22.55.10, /favicon.ico (404 Not Found), [/] > [/favicon.ico] Untested, but in theory: set a location that matches the favicon.ico file and disable logging (e.g. "no log") in that location block.
Re: Clean OpenBSD's httpd logs
On Thu 30.Jun'16 at 15:21:05 +0200, Thuban wrote: > * C. L. Martinez le [30-06-2016 12:50:36 +]: > > Hi all, > > > > Sorry if this question sounds stupid, but how can I avoid this type of > entry in OpenBSD's httpd access.log: > > > > 172.22.55.1:44710 -> 172.22.55.10, /favicon.ico (404 Not Found), [/] > [/favicon.ico] > > > > Hi, > in httpd.conf : > > server "yourdomain.com" { > ... > no log > } > > > You might want to keep access log. Separate errors in another file : > > > server "yourdomain.com" { > ... > log access "yourdomain.access.log" > log error "yourdomain.errors.log" > } > > > see man httpd.conf for more :) > > > -- > /Thuban/ > Thanks Thuban, but I want to log all requests to this web server :) -- Greetings, C. L. Martinez
Re: Clean OpenBSD's httpd logs
Create a favicon.ico file, or ignore the error. httpd is just reporting that the user's browser is trying to fetch /favicon.ico and apparently it doesn't exist. Logging that as a 404 is standard behavior. You don't have one so httpd reports a 404. There are ways of telling the browser to not expect a favicon.ico or telling it that it exists somewhere else (that perhaps doesn't exist), but httpd in this case is really doing nothing wrong. The wisdom of favicons is a different story but they are standard. http://stackoverflow.com/questions/1321878/how-to-prevent-favicon-ico-requests One could argue that perhaps the web server shouldn't log favicon-related 404s...but then there will be someone trying to figure out why his/her favicons aren't showing up and will be looking at logs. On Thu, Jun 30, 2016 at 8:50 AM, C. L. Martinez wrote: > Hi all, > > Sorry if this question sounds stupid, but how can I avoid this type of > entry in OpenBSD's httpd access.log: > > 172.22.55.1:44710 -> 172.22.55.10, /favicon.ico (404 Not Found), [/] > [/favicon.ico] > > ?? > > Thanks. > -- > Greetings, > C. L. Martinez > > -- andrew fabbro and...@fabbro.org
Re: Clean OpenBSD's httpd logs
On Thu, June 30, 2016 8:50 am, C. L. Martinez wrote: > Hi all, > > Sorry if this question sounds stupid, but how can I avoid this type of > entry in OpenBSD's httpd access.log: > > 172.22.55.1:44710 -> 172.22.55.10, /favicon.ico (404 Not Found), [/] > [/favicon.ico] > > ?? > Put a favicon.ico there? The web server has no idea if an attempt to get a missing file shouldn't be logged in some cases and not others. And all the major web browsers automatically look for /favicon.ico so it's going to happen. You might be able to redirect to an existing page but I think those might get logged anyway. Tim.
Re: Clean OpenBSD's httpd logs
* C. L. Martinez le [30-06-2016 12:50:36 +]: > Hi all, > > Sorry if this question sounds stupid, but how can I avoid this type of entry in OpenBSD's httpd access.log: > > 172.22.55.1:44710 -> 172.22.55.10, /favicon.ico (404 Not Found), [/] [/favicon.ico] > Hi, in httpd.conf : server "yourdomain.com" { ... no log } You might want to keep access log. Separate errors in another file : server "yourdomain.com" { ... log access "yourdomain.access.log" log error "yourdomain.errors.log" } see man httpd.conf for more :) -- /Thuban/ [demime 1.01d removed an attachment of type application/pgp-signature which had a name of signature.asc]
Clean OpenBSD's httpd logs
Hi all, Sorry if this question sounds stupid, but how can I avoid this type of entry in OpenBSD's httpd access.log: 172.22.55.1:44710 -> 172.22.55.10, /favicon.ico (404 Not Found), [/] [/favicon.ico] ?? Thanks. -- Greetings, C. L. Martinez