Introduction to the information viewing module of the Linux system Apache service

Source: Internet
Author: User
Tags linux

In this article we'll talk about using Mod_status and mod_info to tell you what kind of information I can get from the current server's work.

With Mod_status, you can find out who is looking at your server and how many people are connected to the Web server. There are other information that your customers may not care about, but for you, a webmaster, it is very useful information.

Customers like the information I don't know what your clients are, but my clients like the information I provide. The information is not enough once a day, because it is too late to know it by the end of the day. So they like to know what's going on right now.

These two modules, Mod_info and Mod_status, can provide very useful information and are very convenient.

Mod_status can tell you exactly what your server is "thinking". You can know who is browsing your site, how many child processes are running, and what these processes are doing.

If you use the default method to install Apache, you should already have Mod_status installed, the only thing to do is to add the following lines to the configuration file (httpd.conf) (in fact, just comment it out)

# Server Status

SetHandler Server-status

Order Deny,allow

Deny from all

Allow from. your_domain.com

This SetHandler statement tells Apache that once a matching request is received (in this case,/server-status) instead of looking for the corresponding file, it is going to be handled by the corresponding module or CGI.

The Mod_status module defines a processor (server-status) and an instruction section (Extendedstatus). In the above configuration, when the/server-status resource is accessed, a report of the server's current activity is provided.

The format is as follows:

w_________ ..... ....... ..... ..... ...... ..... ...... ...... ...... ..... ..... ...

................................................................

................................................................

................................................................

W represents a child process that is being answered, _ represents a connection that an idle child process is waiting to enter. Each point represents a potential child process that has not yet been generated. Each potentially available service is represented in such a paragraph.

He also tells you how much time the system has been running since it was last started. If you need more information, you can turn on the extendedstatus switch, which is off by default. After opening this switch, in addition to the above information, you can also get a list of each child process and its work.

For each subprocess, you can get its PID, as well as the CPU time it takes and the time it has run. For servers, you can get the total number of clicks, CPU utilization, and clicks per minute, and the total number of bytes transmitted to the client after the server starts.

Mod_info

Mpd-info is a category extension module. That means he is not integrated into Apache itself, you have to add it manually.

Mod_info may not be useful to customers, but it is useful for system administrators. In particular, there are many servers that need to be maintained. Use the following sections to implement.

SetHandler Server-info

Order Deny,allow

Deny from all

Allow from. your-domain.com

The revelation of this page is the list of things you compile into Apache and other features that are specific to the server.

If you enter: http://your.server/server-info/can see the server built-in module list or through the DSO loaded modules list.

This is useful for installing and configuring specific servers. Especially when you are looking for problems with the wrong configuration file.

OK, here's the basic introduction to these two modules. Detailed information you still need to ponder. Because in the convenience of customers at the same time, also requires a certain measure of secrecy, the need for these two modules to display information, limited to a specific person to use, so, you also need to use Deny,allow statements to restrict access rights.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.