Key points after upgrading Apache 14.04 to 2.2 in Ubuntu 2.4

Source: Internet
Author: User

Key points after upgrading Apache 14.04 to 2.2 in Ubuntu 2.4

The upgrade from Ubuntu 12.04 to 14.04 will bring some important updates, such as updates from Apache2.2 to 2.4. Although Apache updates have brought about some improvements, when you use the configuration file apache2.2, is it possible to cause errors.

Apache2.4 access control for Virtual Hosts

The authorization of Apache2.4 is more flexible than before. It is just a simple check similar to a data warehouse in Apache2.2. In the past, it was hard to know how to authorize and in what order, but with the introduction of authorization container commands (such as and), the configuration problems during authorization can be solved, you can also know the rules that determine when to have access permissions.

Configuration errors are the cause of most update failures. In Apache2.2, access control is based on IP addresses, hosts, and other features that use command line sorting, allow, deny, and meet the conditions, however, in Apache2.4, you only need to use a new module during the authorization check.

For better understanding, let's take a look at several VM instances in YOUR/etc/apache2/sites-enabled/default or/etc/apache2/sites-enabled/YOURWEBSITENAME:

The old Apache2.2 Virtual Host Configuration:

 Order allow,deny Allow from all

The new Apache2.4 Virtual Host Configuration:

 Require all granted

. Htaccess Problems

If the updated settings cannot be used or the configuration needs to be reconfigured, check whether these settings are in A. htaccess file. If the settings in the. htaccess file are not used, it is because AllowOverride in 2.4 is set to None by default, so the. htaccess file is ignored. You can either add all AllowOverride commands to your site configuration file.

You can also see all the command settings of AllowOverride on the screen above.

Lost configuration files and modules

In my experience, another problem with updates is that the configuration file contains the old module or configuration file which is not needed or supported in 2.4, you will see a conspicuous warning that Apache can't include the respective file and all you have to do is go to your configuration file and remove the line that causes problem. Then you can query or install the same module.

Other small changes you need to know

There are some other changes that usually lead to warnings and do not cause errors, but you need to note:

> The Name Of MaxClients is MaxRequestWorkers, which accurately describes what it is. For Asynchronous MPMs, just like events, the maximum number of customers is not equal to the number of working threads. The old name is still supported.
> The DefaultType command is no longer used. If it is assigned a value (not set to none), a warning is triggered. In 2.4, you need to use other configuration settings to replace it.
> EnableSendfile is Off by default.
> The default value of FileETag is "MTime Size" (No INode ).
> KeepAlive accepts the On or Off values. Previously, values except Off and 0 were treated as On.
> The command AcceptMutex, LockFile, RewriteLock, SSLMutex, SSLStaplingMutex, and WatchdogMutexPath have been replaced by a command Mutex. You need to estimate the use of these removed commands in the configuration of 2.2 to determine whether they are only deleted or need to be replaced by Mutex.

-------------------------------------- Split line --------------------------------------

Install the LAMP \ Vsftpd \ Webmin \ phpMyAdmin service and settings in Ubuntu 13.04

Compile and install LAMP in CentOS 5.9 (Apache 2.2.44 + MySQL 5.6.10 + PHP 5.4.12)

Source code for Web server architecture in RedHat 5.4 build the LAMP environment and application PHPWind

Build a WEB Server Linux + Apache + MySQL + PHP in the LAMP source code Environment

LAMP + Xcache environment setup

-------------------------------------- Split line --------------------------------------

Click here to view the original article

Translator: ** fjxichao ** for more information, visit the linux community.

This article is sincerely contributed by the original translation Group of the help translation team

Help House Original translation Channel:

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.