Article title: Apache information display module. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
In this article, we will discuss how to use mod_status and mod_info to tell you how the current server works.
What information can I get?
With mod_status, you can know who is reading something on your server and how many people are connected to the Web server. There are other
Maybe your customers do not care about the information, but it is very useful for you and a site administrator.
Customers like the materials
I don't know what kind of people your customers are, but my customers like the information I provide. Once a day is not enough because
It's too late. So they like to know what is happening now.
Mod_info and mod_status
These two modules 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 website and how many sub-accounts are there.
Processes are running, and what these processes are doing.
If you use the default method to install Apache, it should have been installed
Mod_status: add the following lines to the configuration file (httpd. conf) (in fact, you only need to comment out the lines)
# 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
The request (in this example/server-status) is not to find the corresponding
Instead, it is processed by the corresponding module or CGI.
The mod_status module defines a server-status and ExtendedStatus ).
In the preceding configuration, when accessing the/server-status resource, the current activity report of the server is provided.
The format is as follows:
W _________...................................... ................
........................................ ........................
........................................ ........................
........................................ ........................
W represents a subprocess that is responding, and _ represents the connection that idle subprocesses are waiting. Each vertex represents a potential that has not yet been generated
In the sub-process. Each potentially usable service is expressed in this section.
He also tells you how long the system has been running since it was last started. If you need more information, open
ExtendedStatus switch, which is off by default. After this switch is turned on, in addition to the above information, you can also get each
List of child processes and their work.
For each sub-process, you can obtain its PID, CPU usage, and running time. For servers,
You can get the total number of clicks, CPU utilization, clicks per minute, and the total number of bytes transmitted to the client after the server is started.
Mod_info
Mpd-info is an extension module of classification. In other words, it is not integrated into Apache, and you must manually add it.
Mod_info may not be very useful for customers, but it is very useful for system administrators. In particular, there are many server requirements
To be maintained. The following sections can be used for implementation.
SetHandler server-info
Order deny, allow
Deny from all
Allow from .your-domain.com
The inspiration displayed on this page is the list of things you compiled into Apache and other server-specific features.
If you enter: http://your.server/server-info/, you can see the server's built-in module list or the list of modules loaded through DSO.
This is very useful for installing and configuring specific servers. It is especially used to find problems with wrong configuration files.
Now, the basic introduction of these two modules is here. You still need to know the details by yourself. Because at the same time as the customer's convenience
The information displayed in these two modules must be restricted to the use of specific personnel. Therefore, Deny and Allow are also required.
Statement.
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