Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the functional features of Apache

2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

What are the functional features of Apache? Perhaps many people do not understand, in order to let you understand better, the editor summed up the following content, I hope you can gain something according to this article.

Apache is a Web server software, has a variety of products, can support SSL technology, support multiple virtual hosts. It is fast, reliable and can compile interpreters such as Perl/Python into the server through a simple API extension.

Apache is characterized by simplicity, high speed, stable performance, and can be used as a proxy server. It can run in most computer operating systems and is widely used because of its cross-platform and security.

1. Supports dynamic loading and unloading of modules

It is the same function as hot-swapping, which can load and unload the module and make it effective without restarting the service.

two。 Support for multiplex processing module MPM

Apache can operate in three (processing) modes, namely:

The prefork--- multi-process iCando model, in which a process processes a request, is the default working mode of Apache.

In this working mode, there is a main process and multiple sub-processes, which are generated and recycled by the main process. The main process is responsible for generating sockets and managing child processes, but not for processing requests. The main process is executed as root.

The child process is the role that is really responsible for handling the request. At first, there will be multiple idle child processes waiting to process the request, one child process handles one request, and the child process is executed by the apache user.

Worker---- Multiplexing Multi-process Istroke O Model

In this working mode, there is a main process, and the same landlord process is responsible for managing child processes and does not process requests. The main process generates multiple sub-processes, while each sub-process generates multiple threads, and one thread processes one request. So assuming that the number of child processes is M and the number of threads of each child process is N, this working mode can process N requests concurrently. This mode takes up a small amount of memory and is mostly used for large websites.

Event- event-driven model

Event works similarly to worker in that it processes multiple requests concurrently. But the improvement made by event is that there is a more detailed division of threads in each child process, there are two types of threads: administrative threads and service threads, so why should they be designed like this?

We know that the HTTP1.1 version defaults to persistent connection keepalive. If a connection is established but no request is sent, it will occupy the bandwidth of this connection until the specified time. Therefore, we have joined the management process to monitor the service thread of keepalive type. When a real request occurs, the management thread transfers the request to the service thread for processing. After processing, the management thread will release the resources of the service thread. The utilization rate of bandwidth is increased.

3. Highly modular

Apache supports the existence of more functions in the form of modularization, and different functions are added and deleted by loading and unloading modules, similar to the modularization of the Linux kernel, which can load and unload kernel driver modules. Constitute the core+modules model

4. Virtual host

The number of visits to some websites is pitifully low, and it is not worthwhile for such a low number of visits to be built on a single server, so I came up with the idea of building multiple websites on one server. multiple websites share a server to reduce resource consumption, which is called virtual hosting function.

A server sets up multiple websites, and each website corresponds to a different domain name. When an external client wants to access it, DNS will resolve the domain names of these different websites to the same server. According to the domain name information in the first line of the HTTP request, the server will direct the request to the corresponding directory resource.

Small tips: the difference between virtual host and virtual machine-> Virtual host is the function of deploying multiple websites on one host, and the hosts supporting so many websites run the same operating system; while virtual machines are multiple hosts virtualized by one system through VMware, LVM and other technologies, these virtual hosts can run different operating systems.

5.CGI Universal Gateway Interface

Support for dynamic web pages. This will be very obscure. First, what is a gateway? a gateway is the intersection at which hosts in two network segments communicate. Hosts in the same network segment do not need to communicate through the gateway, but once hosts in different network segments communicate, you need to hand over the data to the gateway and transfer it to another network segment.

By the same token, CGI,web servers can only send static pages. When the server receives a request for a file, such as index.php, the server cannot send index.php.

Because this is a dynamic file, CGI will process the index.php into a specified data format, then give it to the php interpreter for execution, then process the executed data through CGI, and finally send the result to the client by the server. The CGI here acts as the conversion interface between static and dynamic requests.

6. Support for reverse proxy

7. Load balancing can be achieved.

8. Support path aliases

In order not to let the user know the real directory of the server resource, you can make an alias to the directory. The user only needs to know the alias, and the alias will automatically jump to the real directory.

After reading the above, do you have any further understanding of the functions and features of Apache? If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report