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: