Apache vulnerability repair

Source: Internet
Author: User

Apache vulnerability repair

Today, I was commissioned by my colleagues to fix the Apache vulnerability on a server, mainly in the following aspects:

1. Apache httpd remote denial of service (moderate risk)

Solution: Upgrade Apache HTTP Server to 2.2.20 or later.

Solution: Upgrade HTTP.

Currently, the Apache official website provides source code packages.

For how to use the source code package, refer:

 

2. Clickjacking: X-Frame-Options header missing (low risk)

Suggestion: configure the web server to include an X-Fame-Options Header.

Solution:

1> first, check whether the mod_headers.c module has been compiled.

#/Usr/local/apache2/bin/apachectl-l

2> if not, first compile the mod_headers.c Module

# Cd/root/httpd-2.2.31/modules/metadata/

#/Usr/local/apache2/bin/apxs-I-a-c-n headers mod_headers.c

-- Use apxs to add modules

3> modify the configuration file

# Vim/usr/local/apache2/conf/httpd. conf

Add the following content:

<IFModule mod_headers.c>Header always append X-Frame-Options SAMEORIGIN</IFModule>

4> restart the httpd service.

#/Usr/local/apache2/bin/apachectl restart

 

3. OPTIONS method is enabled (low risk)

Solution: We recommend that you disable the OPTIONS Method on this server.

Solution:

Add a Location container to the configuration file

# Vim/usr/local/apache2/conf/httpd. conf

<Location />    <Limit OPTIONS>        Order allow,deny        Deny from all    </Limit></Location>

 

4. TRACE method is enabled (low risk)

Solution: Disable TRACE Method on this server.

Solution:

Add the following statement to the last line of the configuration file:

# Vim/usr/local/apache2/conf/httpd. conf

TraceEnable off

Install a Web Server on Ubuntu Server 14.04 (Linux + Apache + MySQL + PHP)

Install and configure the PHP environment in Linux (Apache2)

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

Apache details: click here
Apache: click here

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.