Introduction of standalone and inetd mode of Apache operation mode _linux

Source: Internet
Author: User

Do not look closely at the httpd.conf configuration file I don't know about this, Khan.

ServerType This configuration option specifies how to run Apache. Apache can be run in two ways: standalone (standalone) and inetd (Super Daemon-style).

The standalone mode indicates that the Apache process listens in the background with a separate daemon to see if there is a client's request, and if so, generates a child process to serve it. In standalone mode, the Apache process is started at once, while the running period resides in memory, although it loses some system resources, but the access signal responds quickly, and the child httpd process does not break directly after the HTTP request has been completed. This can be used again to accept the new HTTP request, please refer to Apache's keepalive directive (see here). It is more efficient because there is no new Apache root process that starts for each request.

The inetd mode indicates that the Apache service is not supported in the form of a separate waiting process. Instead, inetd, the super waiting process, starts a httpd process to serve it when it listens to a client's HTTP request. A server process run by inted immediately exits when it ends the request service, although it does not occupy the system resources, but it is not suitable to be used in the simultaneous connection of a large number of systems. Because if you end the HTTPD process after the request is complete, the server will be overburdened.

The specific use is as follows:
   Standalone mode
In this mode, the Apache server listens for connection requests for specific ports. When a user initiates a connection request for a specific port address, the primary server process initiates the child httpd process to make the request.
This also requires a specific port address to be told by the master server process to listen to, using the command:

Copy Code code as follows:

Port [number] (default value is 80)

inetd mode

inetd is the Internet daemon (a server process) that listens for all port connection requests less than 1024. Unlike the standalone mode, when a client system sends a connection request to the Apache server, inetd initiates a httpd process that services the request and exits after the service completes.

If you choose to run Apache through the inetd server, you need to edit the/etc/inetd.conf file to add a new record for Apache:

Copy Code code as follows:

httpd Stream TCP nowait httpd/etc/httpd/bin/httpd

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.