Monitor apache VM processes and apache VM

Source: Internet
Author: User
Tags http authentication

Monitor apache VM processes and apache VM

The mod_status module can output the following content:

  • Number of workers (threads or processes) that are requesting a servo
  • Number of idle workers
  • Status of each worker: number of completed requests and number of sent bytes. (*)
  • Total Bytes and sent bytes (*)
  • The time when the server has elapsed since it was started/restarted, and the time when the server has been running.
  • Average number of requests per second, average number of bytes sent per second, and average number of bytes sent per request. (*)
  • The current CPU usage percentage of each worker and the total CPU usage percentage of Apache. (*)
  • Host and request being processed (*)

  • Installation Steps
1. Check whether the mod_status module is loaded.
① Go to the bin directory of Apache
② List all modules currently loaded
If status_module (shared) exists, it indicates that the mod_status module has been loaded. Skip the following steps to install the mod_status module:
1. Go to the mod_status.c directory.
Cd/lamp/httpd-2.2.20/modules/generators
2. Execute the compilation and loading program
/Usr/local/apache/bin/apxs-I-a-c mod_status.c
3. Restart the httpd program.
Service httpd restart
4. Check whether the load is successful.
Httpd-M
③ Enable the ExtendedStatus command and enable status report, edit httpd. conf, and add the following code ExtendedStatus On
<Location/server-status>
SetHandler server-status
Order Deny, Allow
Deny from All
Allow from All
</Location>
.Foo.com allows the specified domain name to access the status page or IP address.
④ Save and exit, and restart apache.

⑤ You can use http://your.server.name/server-statusto access the webpage report at http://your.server.name/server-status? Refresh = N refresh the page every N seconds to achieve real-time monitoring. If the following interface appears, it is not completed yet:

6. Change deny in the following two places to Allow.

7. Access again Http://your.server.name/server-status


Apache Problems

After the apache service is installed, you must set it to automatic in the service if you want to start the service on your own. Operation: Right-click my computer-Manage-services and applications-services, select apache service, right-click Properties, and set the Startup Type to automatic.
Apache is the world's No. 1 Web server software. It can run on almost all widely used computer platforms.
Apache originated from the NCSAhttpd server and has been modified many times to become one of the most popular Web server software in the world. Apache is taken from the pronunciation of "a patchy server", which means a server full of patches, because it is a free software, so there are people who constantly develop new functions, new features, and modify the original defects for it. Apache is simple, fast, and stable, and can be used as a proxy server.
Originally, it was used only for small or experimental Internet networks, and was gradually expanded to various Unix systems, especially for Linux. Apache has multiple products that support SSL technology and multiple virtual hosts. Apache is a process-based structure. Processes consume more system expenses than threads and are not suitable for multi-processor environments. Therefore, when an Apache Web site is expanded, it is usually to add servers or expand cluster nodes, rather than adding processors. Apache is still the most popular Web server in the world so far, with a market share of about 60%. Many famous websites in the world, such as Amazon.com and Yahoo! W3 Consortium and Financial Times are all the products of Apache, its success mainly lies in its open source code, an open development team, and support for cross-platform applications (which can run on almost all Unix, Windows, and Linux platforms) and its portability.
The emergence of Apache is dramatic. After the ncsa www server project pause, those who use the ncsa www server began to exchange their patches for the server, and they soon realized that it was necessary to set up a forum to manage these patches. In this way, the Apache Group was born, and then the Group created Apache on the basis of NCSA.
Apache web server software has the following features:
Supports the latest HTTP/1.1 Communication Protocol
Simple and powerful file-based configuration process
Supports Common Gateway Interfaces
Supports IP-based and domain-based Virtual Hosts
Supports multiple HTTP authentication methods
Integrate the Perl Processing Module
Integrated Proxy Server Module
Supports real-time monitoring of server status and custom server logs
Support for server-side include commands (SSI)
Support for Secure Socket Layer (SSL)
Tracking user session Process
FastCGI support
Third-party modules support Java Servlets
If you are planning to select a Web server, there is no doubt that Apache is your best choice.

Apache Virtual Host Configuration

You should write complete configurations and domain names on your HOST, so you need to add and write all in the HOST file www.123.com. Your configuration should be
NameVirtualHost *: 80
<VirtualHost *: 80>
ServerName www.123.com
DocumentRoot "C:/web"
<Directory "C:/web">
Options FollowSymLinks IncludesNOEXEC Indexes
DirectoryIndex index.html index.htm default.htm index. php default. php index. cgi default. cgi index. pl default. pl index.shtml
AllowOverride Options FileInfo
Order Deny, Allow
Allow from all
</Directory>
</VirtualHost>

It should be written in the conf file. If not, leave a message.

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.