WWW server (2) -- Linux Enterprise Application-Linux server application information. The following is a detailed description. Features of the new Apache version
The Apache server included with RedHat 9.0 is version 2.0, which is significantly different from the previous version 1.3. Apache 2.0 not only supports multi-processor systems, but also ipv6, the function library is also rewritten. All modules in the new version of Apache use the new function library for compilation, so that all modules can support dynamic loading of DSO. (DSO is not a new thing. It has never been a default practice of Apache. To use DSO on Apache in the previous version, you must recompile Apache on your own ). In addition, the new version of Apache also supports a brand new module called Filter. The old module used in the past is called the Handler module.
When it comes to filter, I think Linux commands will be familiar to users. When multiple shell commands are used at a time, we will use pipeline symbols to concatenate commands, in Linux, the pipeline symbol is called the filter symbol, which means that these modules can be chained together like shell commands, for example: ls | grep a | less, the complex and flexible results can be obtained through multiple program relays. The Handler module used in the past directly pushes the processing result back to the browser after processing the content of the web page of the program, send the processing result back to the Apache core module so that it can be handed over to other Filter modules for subsequent processing.
In fact, this new transformation has been going on Microsoft IIS for many years. The biggest benefit is that Web servers will be able to process complex web pages designed by mixing multiple script languages, this was previously considered to be of little use, but with the popularity of Web Computing, this has become a trend. In fact, the transformation of Apache will help to absorb the original users of IIS and JAVA servers, because it is no longer just a dream to use ASP or JSP web pages to execute on Apache.
In addition to these major changes, version 2.0 has some changes in configuration settings. If this change is good or bad, you will be wise, I believe that the preset configuration is not friendly to users in the Chinese world, especially in primary and secondary schools. It must be modified a lot before it can be used. It is a huge change compared with the 1.3 version in the past! The following describes the differences between the old and new versions in the configuration file:
Conf. d
The new version of Apache puts the configuration files used by various modules in/etc/httpd/conf. d: mod_perl, mod_ssl, mod_php ...... so there is this line in the configuration file:
Include conf. d/*. conf
If your Apache is upgraded from the old version, add this line to the original configuration file.
Binding IP addresses to port numbers
The old version of Apache uses BindAddress and Port to specify the server's service location, while the new version of Apache uses Listen to declare the Port to Listen, serverName is used to specify the Port to indicate which DN is used to provide the service. The advantage is that a Web server can serve multiple ports at the same time, you can even use different ports to design a virtual platform (in the past, there were so-called IP base and name base virtual platforms, and now there are more Port base. The following sections describe the virtual platform). For example:
Version 1.3
BindAddress 192.168. 1.2
Port 12000
ServerName wam.spps .tp.edu.tw Listen 12000
ServerName wam.spps.tp.edu.tw: 12000
Multi-Processing Modules (MPMs)
MPMs is a group of special modules. Unlike other modules, MPMs cannot be dynamically loaded (DSO). They must decide which one to use when installing Apache. Currently, there are three types of MPMs, they are prefork, worker, and perchild. As in the past version 1.3, when Apache is activated, that is, the StartServers that will provide services in advance are both fork. This is called prefork. The other two job modes, RedHat 8.0, are not provided yet, you must wait for the new rpm to be installed and used.
The three modules adopt different memory management methods. perchild uses a process to provide services, prefork uses subprograms to provide services, and worker uses two methods. Their differences are as follows: the execution thread can share the memory and use the memory to communicate with other processes. The subroutine uses the memory independently and uses the file to communicate with other subprograms. The former is more efficient, while the latter is safer and more stable.
The three modules are designed to meet different performance requirements. A small lab website uses perchild, which activates five servers at the same time, and each Server can execute up to 10 processes, therefore, 50 online connections can be handled simultaneously. If the KeepAlive function is enabled, up to 5000 requirements can be served at the same time, which is equivalent to the access volume of less than 1000 persons in IIS (performance can also be adjusted in IIS, the pre-configured prefork is provided to medium-magnitude websites. up to 3000 online services can be accepted at the same time. heavyweight websites use worker, A maximum of 22500 online connections can be accepted, and about 0.2 million requirements can be met.
This change affects StartServers, shards, MaxSpareServers, MaxClients, MaxRequestsPerChild, NumServers, StartThreads, MinSpareThreads, MaxSpareThreads, MaxThreadsPerChild, and so on. The default value is as follows:
Server-Pool Size Regulation
Dynamic Shared Object (DSO)
DSO has been fully used in the new version of Apache. In the past, DSO was one of the options for compiling Apache. Since DSO has never been supported by various versions of Linux, you must download the original file for compilation if you want to use it, the full rewrite of the Apache module should be closely related to the full adoption of DSO. As mentioned above, because the Apache module operates in the form of a filter, many modules are merged, separated, removed, or renamed, and the order of concatenation between modules becomes more important, therefore, Apache allows the module to specify its own order. The AddModule and ClearModuleList provided in the configuration file have been canceled and the LoadModule command order has been ignored. Install the RPM, such as mod_perl, mod_ssl, and mod_php ...... and you do not need to add the LoadModule settings because they will be automatically loaded. In addition, the HAVE_XXX macro commands used to detect which modules are loaded are no longer used, because the current modules are dynamically loaded.
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.