Httpd-2.4 Characteristics

Source: Internet
Author: User

Httpd-2.4 Characteristics

1. Overview of httpd-2.4 features

Reference official website information: http://httpd.apache.org/docs/2.4/new_features_2_4.html

1. httpd-2.4 official announcement of new features (all)

(1) MPM supports DSO operation and is loaded as needed in the form of modules;

(2) event-driven support. The production environment of the eventMPM module is available;

(3) support asynchronous read/write;

(4) Each module and each directory can be defined at a separate log level;

(5) Professional configuration related to each request; <If>

(6) Enhanced expression analyzer;

(7) support the definition of keepalivetimeout in milliseconds );

(8) The FQDN-based VM no longer needs the NameVirtualHost command;

(9) Support new commands, AllowOverrideList

(10) User-Defined variables are supported;

(11) reduce memory consumption

 

2. New module (partial)

(1) mod_proxy_fcgi: backend protocol module of apache server supported by reverse proxy

(2) mod_proxy_scgi: module supporting the backend protocol of the python server during proxy

(3) mod_proxy_express: Dynamic proxy configuration based on Expressions

(4) mod_remoteip: the IP-based access control mechanism is changed.

Some configuration mechanisms have been modified: Order, Deny, and Allow are no longer supported for IP-based access control;

... ...

 

2. CentOS 7 RPM installation and configuration httpd-2.4

Main configuration file:/etc/httpd/conf/httpd. conf

Module configuration file:/etc/httpd/conf. modules. d/*. conf

Auxiliary configuration file:/etc/httpd/conf. d/*. conf

1. Switch to use MPM

1) mpm: Provided by the dynamic module of the DSO mechanism. The configuration file is 00-mpm.conf.

[Root @ localhost ~] # Vim/etc/httpd/conf. modules. d/00-mpm.conf enable module configuration information

LoadModulempm_NAME_module modules/mod_mpm_NAME.so

NAME: prefork, event, worker

2) service Control: systemctl {start | stop | restart | status | reload} httpd. service

 

2. Modify the DocumentRoot of the 'main' server.

By default, no webpage defined by DocumentRoot can be accessed. authorization is required.

<Directory>… must be defined... ... <Directory> container control permission

 

3. IP-based Access Control Rules

(1) set all

Allow access from all hosts: Requireall granted

Deny Access to All Hosts: Requireall deny

(2) control access from specific IP addresses

Require ip IPADDR: Authorize the host to access the specified source address

Require not ip IPADDR: deny access to the host from the specified source address

IPADDR:

IP: 172.16.100.2

Network/mask: 172.16.0.0/255.255.255.0.0

Network/Length: 172.16.0.0/16

Net: 172.16

(3) control access to a specific host (HOSTNAME)

Requirehost HOSTNAME: Authorize access from the host of the specified source;

Requirenot host HOSTNAME: Reject

The HOSTNAME format can be as follows:

FQDN: specific host

Domin. tld: All Hosts under the specified domain name

Note: To define multiple control commands, use the container <RequireAll>... ... </RequireAll> to write

Example: <RequireAll>

Requireall granted

Requirenot ip 172.16.100.2

</RequireAll>

 

4. VM Configuration

The NameVirutalHost command is no longer required for FQDN-based virtual hosts;

<VirtualHost *: 80>

ServerNamewww. B .net

DocumentRoot "/apps/B .net/htdocs"

<Directory "/apps/B .net/htdocs">

OptionsNone

AllowOverrideNone

Requireall granted

</Directory>

</VirtualHost>

Note: pages under any directory can only be accessed with explicit authorization;

 

5. SSL module: no changes

# Yum install-y mod_ssl

 

6. Definition of persistent connection duration in milliseconds: KeepAliveTimeout # ms

This article permanently updates the link address:

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.