Your Daily Source for Apache News and Information |
Breaking News | Preferences | Contribute | Triggers | Link Us | Search | About |
|
In this article, I'll talk about using What sort of information can I get?Using Customers love this stuffI don't know how your customers are, but my customers like information. How much information? More information. Up-to-the-minute information. Detailed information. Daily reports are not good enough, because by the end of the day, it's already too late. They want to know what's going on right now. In fact, I have one customer who ... well, I suppose I shouldn't say anything more. After all, he might actually read my column. Anyways, the point is, customers love this sort of thing. By giving them this sort of detailed information, at the cost of a few configuration changes, you are the hero and it looks like you did a lot of work for it. Don't worry. I won't tell. mod_info and mod_statusThere are two modules that I'll talk about in this column. They give you two rather different types of information, but they are both very handy.
mod_status
If you did a default build of Apache, you will have # Server status <Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from .your_domain.com </Location> The The With the configuration above, accessing the resource This will look something like: W_________...................................................... ................................................................ ................................................................ ................................................................ The In the example above, only one child was active, while 9 others were waiting in the wings for incoming traffic. It will additionally tell you how long the server has been up since the last restart, the date and time of that last restart, and there will be a key explaining each of the symbols appearing in the diagram. If you want more information than this, you need to use For each child, you'll get the PID, how many times that particular child has been accessed, and how much CPU time it is using. For the server, you'll get a count of total ``hits'' since server restart, CPU usage, and a ``hits per minute'' statistic, as well as a total quantity of data that has been pushed out to clients. For the purposes of amusing the customer, you really should turn on Which brings me to the rest of the above configuration. Although it might amuse the customer to know who is accessing what resource, you probably don't want this information available to the whole Internet. And, with some customers, you might not even want them knowing this sort of thing. There are questions of user confidentiality to be addressed, but I'll leave that to your own conscience for the moment. You should restrict access to this service to hosts you know about, and which you think should have access to the information for actual valid reasons. There are voyeurs that get great entertainment from watching mod_info
Use the following set of directives: <Location /server-info> SetHandler server-info Order deny,allow Deny from all Allow from .your-domain.com </Location> The At the top of the page, when you access http://your.server/server-info/ you'll see a list of each of the modules that is built into your server, or is loaded as a DSO. Each of these is linked to a section lower down in the document where you will have listed all of the active configuration directives that are defined by that module, wherever in the configuration file they might be placed. This is great for figuring out quickly how a particular server is set up, and for trouble-shooting any problems that you might be having which are caused by misconfiguration. Examples?There's no very effective way for me to show you a running example of these modules running on my servers, as I have them configured to only show these pages to certain addresses. But the change can be made very quickly on your server (unless you don't have the modules installed!) and you can try it for yourself. That's all for this weekPlease let me know if you have any particular subjects that you'd like for me to cover in the future. You can contact me via the Talkbacks, or email me at Related Stories: |
|
|
About Triggers | Media Kit | Security | Triggers | Login |
All times are recorded in UTC. Linux is a trademark of Linus Torvalds. Powered by Linux 2.4, Apache 1.3, and PHP 4 Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy. |