3 ms·
I'm surprised more people don't use the logs in web servers. Out of the box they are already on and running with little overhead. They usually tell me everythin
by combatentropy 7y ago
I'm surprised more people don't use the logs in web servers. Out of the box they are already on and running with little overhead. They usually tell me everything I want to know about usage.
But I don't do things like custom headers:
> a header value generalizing the shape of the endpoint path
> (e.g. /products/foobarbaz → /products/:prod)
Instead I analyze the logs with Bash (grep, cut, awk, sort, uniq). In fact I think Apache's logs are one of the main places where I learned these tools.
- umanwizard 7y agoSorry for the nitpick, but it’s a pet peeve of mine that people think the entire suite of Unix command line tools is part of “bash”.
- combatentropy 7y agoThank you, I will try to avoid it. In fact I started calling them all "bash" only recently, seeking a short name instead of "Unix command-line tools." But you're right, it's inaccurate.
- CamJN 7y agoThe tools you listed can be referred to as coreutils: https://en.wikipedia.org/wiki/GNU_Core_Utilities https://en.wikipedia.org/wiki/GNU_Core_Utilities
- jrumbut 7y agoSomething I worked on but never released was a series of posts/small book that was about actually using Apache (one could write the same for Nginx). There are (metaphorical) $20 bills lying all over the ground in small, medium, and ever large applications' server settings. Or at least that's my experience, that usually someone puts in the conf file from a tutorial somewhere and they're off to the races. Maybe a few things get tweaked if there's a problem. Fortunately a lot of distros have somewhat better defaults now but it's still often easy wins on performance, logging, or security to be found.