第 3 章 Apache httpd

LAMP

目录

3.1. Install
3.1.1. Quick install apache with aptitude
3.1.1.1. command
3.1.1.2. rewrite module
3.1.1.3. PHP module
3.1.1.4. deflate module
3.1.1.5. ssl module
3.1.1.6. VirtualHost
3.1.1.7. ~userdir module - /public_html
3.1.1.8. PHP 5
3.1.2. CentOS 6
3.1.2.1. Install
3.1.2.2. Uninstall
3.1.2.3. Configure
3.1.2.3.1. Apache
3.1.2.3.1.1. VirtualHost
3.1.2.3.2. MySQL
3.1.2.4. Starting
3.1.2.5. FAQ
3.1.2.5.1. compile php
3.1.3. Compile and then install Apache
3.1.3.1. Apache 安装与配置
3.1.3.2. 优化编译条件
3.1.3.3. PHP
3.1.3.4. Automation Installing
3.1.4. XAMPP
3.1.4.1. XAMPP for Linux
3.1.4.2. php5
3.2. Module
3.2.1. Output a list of modules compiled into the server.
3.2.2. Core
3.2.2.1. Listen
3.2.2.2. Filesystem and Webspace
3.2.2.2.1. Options
3.2.2.3. Etag
3.2.2.4. 隐藏 Apache 版本信息
3.2.3. mpm
3.2.3.1. event
3.2.3.2. worker
3.2.4. Apache Log
3.2.4.1. LogLevel
3.2.4.2. LogFormat
3.2.4.3. Compressed
3.2.4.4. rotatelogs - Piped logging program to rotate Apache logs
3.2.4.5. cronolog
3.2.4.6. 日志合并
3.2.4.7. 日志归档
3.2.4.8. logger
3.2.4.9. other
3.2.5. mod_access
3.2.6. VirtualHost
3.2.6.1. ServerName/ServerAlias
3.2.6.2. rotatelogs
3.2.7. Alias / AliasMatch
3.2.8. Redirect / RedirectMatch
3.2.9. Rewrite
3.2.9.1. R=301
3.2.9.2. Rewrite + JkMount
3.2.9.3. Apache redirect domain.com to www.domain.com
3.2.9.4. 正则匹配扩展名
3.2.10. Proxy
3.2.10.1. Reverse proxy
3.2.11. Deflate
3.2.11.1. 测试 gzip,deflate 模块
3.2.12. Expires
3.2.12.1. FilesMatch
3.2.12.2. Cache-Control
3.2.12.3. ETag
3.2.13. Cache
3.2.13.1. mod_disk_cache
3.2.13.2. mod_mem_cache
3.2.14. usertrack
3.2.15. Charset
3.2.16. Dir
3.2.17. Includes
3.2.18. Apache Status
3.2.19. Mod Perl
3.2.20. mod_pagespeed -
3.2.21. Module FAQ
3.2.22. mod_setenvif
3.2.23. PHP 程序安全问题 php_admin_value
3.2.24. mod_spdy
3.3. 设置Apache实现防盗连
3.4. .htaccess
3.5. Error Prompt
3.5.1. Invalid command 'Order', perhaps misspelled or defined by a module not included in the server configuration
3.5.2. Invalid command 'AuthUserFile', perhaps misspelled or defined by a module not included in the server configuration

3.1. Install

3.1.1. Quick install apache with aptitude

$ sudo apt-get install apache2 $ sudo apt-get install apache2-mpm-worker

netkiller@Linux-server:~$ sudo apt-get install apache2
		

3.1.1.1. command

enable module: a2enmod

enable site: a2ensite

3.1.1.2. rewrite module

$ sudo a2enmod rewrite
			

3.1.1.3. PHP module

$ sudo a2enmod php5
			

3.1.1.4. deflate module

root@neo:/etc/apache2# a2enmod deflate
Module deflate installed; run /etc/init.d/apache2 force-reload to enable.
root@neo:/etc/apache2# /etc/init.d/apache2 force-reload
 * Forcing reload of apache 2.0 web server...                                                [ ok ]
root@neo:/etc/apache2#
			

3.1.1.5. ssl module

a2enmod ssl

a2ensite ssl

/etc/apache2/httpd.conf 加入

ServerName 220.201.35.11
			

安全模块

netkiller@Linux-server:~$ sudo apt-get install libapache2-mod-security

netkiller@Linux-server:/etc/apache2$ sudo vi ports.conf
netkiller@Linux-server:/etc/apache2$ cat ports.conf
Listen 80
Listen 443

NameVirtualHost *
NameVirtualHost *:443

netkiller@Linux-server:/etc/apache2$ sudo apache2-ssl-certificate
or
netkiller@Linux-server:~$ apache2-ssl-certificate -days 365

netkiller@Linux-server:~$ a2enmod ssl
or
netkiller@Linux-server:/etc/apache2/mods-enabled$ sudo ln -s ../mods-available/ssl.conf
netkiller@Linux-server:/etc/apache2/mods-enabled$ sudo ln -s ../mods-available/ssl.load

netkiller@Linux-server:/etc/apache2/sites-enabled$ sudo mkdir ssl/
netkiller@Linux-server:/etc/apache2/sites-enabled$ sudo cp netkiller woodart ssl/

netkiller@Linux-server:/etc/apache2/mods-enabled$ sudo /etc/init.d/apache2 reload
 * Reloading apache 2.0 configuration...                                        [ ok ]
netkiller@Linux-server:/etc/apache2/mods-enabled$

3.1.1.6. VirtualHost

VirtualHost 虚拟主机

netkiller@Linux-server:/etc/apache2/sites-available$ sudo vi woodart

#NameVirtualHost neo.6600.org
<VirtualHost 220.201.35.11>
        ServerAdmin openx@163.com

        DocumentRoot /home/netkiller/www
        ServerName neo.6600.org
        ServerAlias www.neo.6600.org
        <Directory /home/netkiller/www>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
                # Uncomment this directive is you want to see apache2's
                # default start page (in /apache2-default) when you go to /
                #RedirectMatch ^/$ /apache2-default/
        </Directory>

#       ScriptAlias /cgi-bin/ /home/netkiller/www/
#       <Directory "/home/netkiller/www">
#               AllowOverride None
#               Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
#               Order allow,deny
#               Allow from all
#       </Directory>

        ErrorLog /var/log/apache2/neo.error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
#       LogLevel warn

        CustomLog /var/log/apache2/neo.access.log combined
#       ServerSignature On

</VirtualHost>

netkiller@Linux-server:/etc/apache2/sites-available$ sudo apache2 -k restart

3.1.1.7. ~userdir module - /public_html

~web环境

netkiller@Linux-server:~$ mkdir public_html
netkiller@Linux-server:~$ cd public_html/
netkiller@Linux-server:~/public_html$
netkiller@Linux-server:~/public_html$ echo helloworld>index.html
netkiller@Linux-server:~/public_html$ ls
index.html
			

http://xxx.xxx.xxx.xxx/~netkiller/

3.1.1.8. PHP 5

$ sudo apt-get install php5

netkiller@Linux-server:~$ sudo apt-get install php5
			

pgsql模块

netkiller@Linux-server:~$ sudo apt-get install php5-pgsql

netkiller@Linux-server:~$sudo cp /usr/lib/php5/20051025/pgsql.so /etc/php5/apache2/
			

php5-gd - GD module for php5

$ sudo apt-get install php5-gd

netkiller@Linux-server:~$ apt-cache search gd
libgdbm3 - GNU dbm database routines (runtime version)
libgd2-xpm - GD Graphics Library version 2
php5-gd - GD module for php5
pnm2ppa - PPM to PPA converter
postgresql-doc-8.1 - documentation for the PostgreSQL database management system
libruby1.8 - Libraries necessary to run Ruby 1.8
ruby1.8 - Interpreter of object-oriented scripting language Ruby 1.8
klogd - Kernel Logging Daemon
sysklogd - System Logging Daemon
upstart-logd - boot logging daemon
netkiller@Linux-server:~$ sudo apt-get install php5-gd

netkiller@Linux-server:~$

3.1.2. CentOS 6

3.1.2.1. Install

Apache

[root@development ~]# yum -y install httpd

PHP

[root@development ~]# yum -y install php
[root@development ~]# yum -y install php-mysql php-gd php-mbstring php-bcmath
[neo@development ~]$ sudo yum -y install php-pecl-memcache

mysql

[root@development ~]# yum -y install mysql-server

3.1.2.2. Uninstall

# yum remove httpd
			

3.1.2.3. Configure

3.1.2.3.1. Apache

3.1.2.3.1.1. VirtualHost
[root@development ~]# vim /etc/httpd/conf.d/vhost.conf
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host.example.com
    DocumentRoot /www/docs/dummy-host.example.com
    ServerName dummy-host.example.com
    ErrorLog logs/dummy-host.example.com-error_log
    CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>
3.1.2.3.2. MySQL

reset mysql's password

[root@development ~]# /usr/bin/mysqladmin -u root password 'new-password'
[root@development ~]# /usr/bin/mysqladmin -u root -h development.domain.org password 'new-password'

Alternatively you can run:

[root@development ~]# /usr/bin/mysql_secure_installation

3.1.2.4. Starting

levels

[root@development ~]# chkconfig --list mysqld
mysqld          0:off   1:off   2:off   3:off   4:off   5:off   6:off

[root@development ~]# chkconfig --list httpd
httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off

[root@development ~]# chkconfig httpd on
[root@development ~]# chkconfig --list httpd
httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off

[root@development ~]# chkconfig mysqld on
[root@development ~]# chkconfig --list mysqld
mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off

Apache

[root@development ~]# service httpd start

MySQL

[root@development ~]# service mysqld start
[root@development ~]# netstat -nat | grep 80
tcp        0      0 :::80                       :::*                        LISTEN

[root@development ~]# netstat -nat | grep 3306
tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN

3.1.2.5. FAQ

3.1.2.5.1. compile php
[root@development php-5.3.0]# yum install libxml2-devel
[root@development php-5.3.0]# yum install curl-devel
[root@development php-5.3.0]# yum install gd-devel
[root@development php-5.3.0]# yum install libjpeg-devel
[root@development php-5.3.0]# yum install libpng-devel
[root@development php-5.3.0]# yum install openldap-devel
[root@development php-5.3.0]# yum install mysql-devel
[root@development php-5.3.0]# yum install net-snmp-devel
				

3.1.3. Compile and then install Apache

3.1.3.1. Apache 安装与配置

configure

--with-mpm=worker 进程,线程混合方式效率提高不少

--enable-modules='dir mime' 没有它就找不到index.*文件

--enable-rewrite=shared Rewrite用于表态化

--enable-expires=shared 禁止页面被 cache

--enable-authz_host=shared Order权限

--enable-setenvif=shared

--enable-log_config=shared 日志格式

--enable-speling=shared 允许自动修正拼错的URL

--enable-deflate=shared 压缩传送

--enable-mods-shared='cache file-cache disk-cache mem-cache proxy proxy-ajp proxy-balancer' 代理和缓存

用于Java

tar zxvf httpd-2.2.4.tar.gz
cd httpd-2.2.4
./configure --prefix=/usr/local/httpd-2.2.4 \
--with-mpm=worker \
--enable-modules='dir mime' \
--enable-rewrite=shared \
--enable-authz_host=shared \
--enable-alias=shared \
--enable-setenvif=shared \
--enable-log_config=shared \
--enable-speling=shared \
--enable-filter=shared \
--enable-deflate=shared \
--enable-headers=shared \
--enable-expires=shared \
--enable-mods-shared='cache file-cache disk-cache mem-cache proxy proxy-ajp proxy-balancer' \
--disable-include \
--disable-actions \
--disable-alias \
--disable-asis \
--disable-autoindex \
--disable-auth_basic \
--disable-authn_file \
--disable-authn_default \
--disable-authz_groupfile \
--disable-authz_user \
--disable-authz_default \
--disable-cgi \
--disable-cgid \
--disable-env \
--disable-negotiation \
--disable-status \
--disable-userdir
			

用于PHP

[root@development httpd-2.2.14]# yum install zlib-devel.x86_64

./configure --prefix=/usr/local/httpd-2.2.14 \
--with-mpm=worker \
--enable-so \
--enable-mods-shared=all \
--enable-static-support \
--enable-static-htpasswd \
--enable-static-htdigest \
--enable-static-ab \
--disable-include \
--disable-actions \
--disable-alias \
--disable-asis \
--disable-autoindex \
--disable-auth_basic \
--disable-authn_file \
--disable-authn_default \
--disable-authz_groupfile \
--disable-authz_user \
--disable-authz_default \
--disable-cgi \
--disable-cgid \
--disable-env \
--disable-negotiation \
--disable-status \
--disable-userdir
			

make; make install

启动

ln -s /usr/local/httpd-2.2.4/ /usr/local/apache

/usr/local/httpd/bin/apachectl start
			

3.1.3.2. 优化编译条件

# vim server/mpm/worker/worker.c

# define DEFAULT_SERVER_LIMIT 256
# define MAX_SERVER_LIMIT 20000
# define DEFAULT_THREAD_LIMIT 512
# define MAX_THREAD_LIMIT 20000
			

3.1.3.3. PHP

过程 3.1. 安装PHP

  1. 第一步

    cd /usr/local/src
    wget http://cn2.php.net/get/php-5.3.0.tar.bz2/from/cn.php.net/mirror
    tar jxvf php-5.3.0.tar.bz2
    cd php-5.3.0
    				
  2. 第二步
    ./configure --prefix=/usr/local/php-5.3.0 \
    --with-config-file-path=/usr/local/php-5.3.0/etc \
    --with-apxs2=/usr/local/apache/bin/apxs \
    --with-curl \
    --with-gd \
    --with-ldap \
    --with-snmp \
    --enable-zip \
    --enable-exif \
    --with-libxml-dir \
    --with-mysql \
    --with-mysqli \
    --with-pdo-mysql \
    --with-pdo-pgsql
    
    make
    make test
    make install
    				
    1. 建立符号连接

      ln -s /usr/local/php-5.3.0 /usr/local/php
      		      
    2. php.ini
      cp php.ini-dist /usr/local/php/etc/php.ini
      			    	
    3. conf/httpd.conf
      AddType application/x-httpd-php .php .phtml
      AddType application/x-httpd-php-source .phps
      			    	

      reload apache

  3. 最后一步

    phpinfo() 测试文件复杂到apache目录

    例 3.1. index.php

    <?php phpinfo(); ?>
    
--with-snmp

redhat as4 启用 --with-snmp 需要安装下面包

rpm -i elfutils-libelf-devel-0.97.1-3.i386.rpm
rpm -i elfutils-devel-0.97.1-3.i386.rpm
rpm -i beecrypt-devel-3.1.0-6.i386.rpm
rpm -i net-snmp-devel-5.1.2-11.EL4.7.i386.rpm
			

3.1.3.4. Automation Installing

例 3.2. autolamp.sh

#!/bin/bash
HTTPD_SRC=httpd-2.2.15.tar.gz
PHP_SRC=php-5.2.13.tar.gz
MYSQL_SRC='mysql-5.1.45.tar.gz'
MYSQL_LIBS_SRC='mysql-5.1.45-linux-x86_64-glibc23.tar.gz'

SRC_DIR=$(pwd)
HTTPD_DIR=${HTTPD_SRC%%.tar.gz}
PHP_DIR=${PHP_SRC%%.tar.*}
MYSQL_DIR=${MYSQL_SRC%%.tar.*}
MYSQL_LIBS_DIR=${MYSQL_LIBS_SRC%%.tar.*}

function clean(){
        rm -rf $HTTPD_DIR
        rm -rf $PHP_DIR
        rm -rf $MYSQL_DIR
        rm -rf $MYSQL_LIBS_DIR
}
function mysql(){
rm -rf $MYSQL_DIR
tar zxf $MYSQL_SRC
cd $MYSQL_DIR
./configure \
--prefix=/usr/local/$MYSQL_DIR \
--with-mysqld-user=mysql \
--with-unix-socket-path=/tmp/mysql.sock \
--with-charset=utf8 \
--with-collation=utf8_general_ci \
--with-pthread \
--with-mysqld-ldflags \
--with-client-ldflags \
--with-openssl \
--without-docs \
--without-debug \
--without-ndb-debug \
--without-bench
#-–without-isam
#--without-innodb \
#--without-ndbcluster \
#--without-blackhole \
#--without-ibmdb2i \
#--without-federated \
#--without-example \
#--without-comment \
#--with-extra-charsets=gbk,gb2312,utf8 \

#--localstatedir=/usr/local/mysql/data
#--with-extra-charsets=all
make clean
make && make install
cd ..
/usr/local/$MYSQL_DIR/bin/mysql_install_db
}
function httpd(){
rm -rf $HTTPD_DIR
tar zxf $HTTPD_SRC
cd $HTTPD_DIR
./configure --prefix=/usr/local/$HTTPD_DIR \
--with-mpm=worker \
--enable-so \
--enable-mods-shared=all \
--disable-authn_file \
--disable-authn_default \
--disable-authz_groupfile \
--disable-authz_user \
--disable-authz_default \
--disable-auth_basic \
--disable-include \
--disable-env \
--disable-status \
--disable-autoindex \
--disable-asis \
--disable-cgi \
--disable-cgid \
--disable-negotiation \
--disable-actions \
--disable-userdir \
--disable-alias

make clean
make && make install
cd ..
}
function php(){
rm -rf $MYSQL_LIBS_DIR
tar zxf $MYSQL_LIBS_SRC
rm -rf $PHP_DIR
tar zxf $PHP_SRC
cd $PHP_DIR

./configure --prefix=/usr/local/$PHP_DIR \
--with-config-file-path=/usr/local/$PHP_DIR/etc \
--with-apxs2=/usr/local/$HTTPD_DIR/bin/apxs \
--with-curl \
--with-gd \
--with-jpeg-dir=/usr/lib64 \
--with-iconv \
--with-zlib-dir \
--with-pear \
--with-libxml \
--with-dom \
--with-xmlrpc \
--with-openssl \
--with-mysql=/usr/local/mysql-5.1.45-linux-x86_64-glibc23 \
--with-mysqli \
--with-pdo-mysql \
--enable-memcache \
--enable-zip \
--enable-sockets \
--enable-soap \
--enable-mbstring \
--enable-magic-quotes \
--enable-inline-optimization \
--enable-xml

#make && make test && make install
make &&  make install
cp /usr/local/src/$PHP_DIR/php.ini-dist /usr/local/$PHP_DIR/php.ini
}
function depend(){
        yum install gcc gcc-c++ -y
        yum install -y libxml2-devel libxslt-devel
        yum install curl-devel -y
        yum install gd-devel libjpeg-devel libpng-devel -y
        yum install ncurses-devel -y
        yum install mysql-devel -y
        yum install libevent-devel -y
}
function java(){
        #yum install java-1.6.0-openjdk -y
        chmod +x jdk-6u20-linux-x64.bin
        ./jdk-6u20-linux-x64.bin
        mv jdk1.6.0_20 ..
        ln -s /usr/local/jdk1.6.0_20 /usr/local/java
}
function memcached(){
        MEMCACHED_PKG=memcached-1.4.5.tar.gz
        MEMCACHED_SRC=memcached-1.4.5
        rm -rf $MEMCACHED_SRC
        tar zxf $MEMCACHED_PKG
        cd $MEMCACHED_SRC
        ./configure --prefix=/usr/local/memcached-1.4.5
        make && make install
}
# See how we were called.
case "$1" in
  clean)
        clean
        ;;
  httpd)
        httpd
        ;;
  php)
        php
        ;;
  mysql)
        if [ -f $0 ] ; then
                mysql
        fi
        ;;
  depend)
        depend
        ;;
  java)
        java
        ;;
  memcached)
        memcached
        ;;
  all)
        clean

        echo ##################################################
        echo # $MYSQL_DIR Installing...
        echo ##################################################
        mysql

        echo ##################################################
        echo # $HTTPD_DIR Installing...
        echo ##################################################
        httpd

        echo ##################################################
        echo # $PHP_DIR Installing...
        echo ##################################################
        php

        ln -s /usr/local/$HTTPD_DIR /usr/local/apache
        ln -s /usr/local/$MYSQL_DIR /usr/local/mysql
        ln -s /usr/local/$PHP_DIR /usr/local/php

        clean
        ;;
  *)
        echo $"Usage: $0 {httpd|php|mysql|all|clean}"
        RETVAL=2
        ;;
esac

exit $RETVAL

3.1.4. XAMPP

3.1.4.1. XAMPP for Linux

http://www.apachefriends.org/en/xampp-linux.html

install

tar xvfz xampp-linux-1.7.3a.tar.gz -C /opt
			

start

/opt/lampp/lampp start
			

stop

/opt/lampp/lampp stop
			

remove

rm -rf /opt/lampp
			

3.1.4.2. php5

./lampp php5
XAMPP: PHP 5.3.8 already active.

./lampp startapache
XAMPP: Starting Apache with SSL (and PHP5)...

./lampp startmysql
XAMPP: Starting MySQL...
		

原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

时间: 2018-01-01

第 3 章 Apache httpd的相关文章

我是如何通过fuzz apache httpd服务发现CVE-2017-7668

本文讲的是我是如何通过fuzz apache httpd服务发现CVE-2017-7668, 目标 在fuzz过程中发现apache httpd服务在AFL下崩溃掉了,导致出现了很多问题,比如模糊测试程序稳定性下降,模糊测试之外的程序不会崩溃等等.在这篇文章中,我会在展示漏洞的同时尝试解释这些问题,最后再对崩溃本身进行一定的说明. 测试用例 由于这只是我自己用AFL来模拟继续程序的网络模糊测试,所以我没有考虑太多复杂以及覆盖范围广的例子. 所以,为了获得大量安装apache httpd服务的案例

Linux下配置Apache httpd

httpd是Apache超文本传输协议(HTTP)服务器的主程序.它被设计为一个独立运行的后台进程,它会建立一个处理请求的子进程或线程的池对外提供服务.httpd支持基于 虚拟主机,以及基于HOST.IP.PORT实现虚拟主机,反向代理,负载均衡,路径别名,用户认证,basic,支持第三方模块等众多特性.本文主要描述了Linux下httpd(2.2版本)的相关基本配置. 1.配置文件概述 配置文件,主要分为3个部分: # grep "Section" /etc/httpd/conf/h

Apache httpd 目录列表禁用配置(options indexes)

Apache httpd服务器在缺省的情况下,开启了基于目录列表的访问,这是一个存在安全隐患的问题,因此可以关闭这个功能.在Apache 2.4的版本中,不在支持使用-indexes来配置,需要注释该功能.本文对此给出演示,供大家参考. 一.缺省情况目录列表可查看示例 当前环境 [root@centos7-web ~]# more /etc/redhat-release CentOS Linux release 7.2.1511 (Core) [root@centos7-web ~]# apac

绿盟科技网络安全威胁周报2017.25 关注多个Apache httpd安全漏洞CVE-2017-3167等

绿盟科技发布了本周安全通告,周报编号NSFOCUS-17-25,绿盟科技漏洞库本周新增40条,其中高危11条.本次周报建议大家关注 多个Apache httpd安全漏洞 .Apache官方已经针对2.2.x以及2.4.x发布了相应的2.2.33-dev以及2.4.26新版本修复了上述各漏洞,请受影响的用户及时下载更新至最新版本来防护漏洞. 焦点漏洞 多个Apache httpd安全漏洞 NSFOCUS ID 36932 36933 36934 36935 36936 CVE ID CVE-201

Linux下编译安装Apache httpd 2.4

Apache是世界使用排名第一的Web服务器软件.它可以运行在几乎所有广泛使用的计算机平台上,由于其跨平台和安全性被广泛使用,是最流行的Web服务器端软件之一.当前Apache版本为2.4,本文主要描述基于CentOS 6.5以源码方式安装Apache httpd. 一.编译安装的优势 源码的编译安装一般由3个步骤组成: 配置(configure),通常依赖gcc编译器,binutils,glibc.配置软件特性,检查编译环境,生成 Makefile文件 编译(make) 安装(make ins

Linux(CentOS)系统下安装好apache(httpd)服务后,其他电脑无法访问的原因

原文:Linux(CentOS)系统下安装好apache(httpd)服务后,其他电脑无法访问的原因 今天试了下在虚拟机上利用CentOS系统的yum命令安装好了httpd(apache2.4.6),然后在windows系统下访问此虚拟机的ip地址,却访问不了. 因为前段时间有知道过iptable的限制,所以在想是不是因为iptable限制了80端口呢! 所以在网上找了下iptable的命令,并且把tcp的80端口设置成允许任何IP都可以访问: iptables -I INPUT -p TCP

Apache httpd 出现多个漏洞 可能引发DoS攻击 2.2.x及2.4.x版本受影响

近日,Apache 官方发布了httpd的新版本修复了多个安全漏洞,涉及CVE-2017-3167,CVE-2017-3169,CVE-2017-7659,CVE-2017-7668,CVE-2017-7679,可以造成身份验证被绕过以及拒绝服务攻击等.大部分Apache httpd 2.2.x以及2.4.x版本均受影响.相关漏洞信息如下: CVE编号 漏洞描述 CVE-2017-3167 第三方模块在验证阶段以外调用ap_get_basic_auth_pw()时有可能导致验证要求被绕过 CVE

漏洞预警:Apache httpd 出现多个重要安全漏洞

漏洞编号: CVE-2017-3167 CVE-2017-3169 CVE-2017-7659 CVE-2017-7668 CVE-2017-7679 漏洞名称: Apache httpd 多个安全漏洞 官方评级: 高危 漏洞描述: CVE-2017-3167 第三方模块在身份验证阶段使用ap_get_basic_auth_pw(),会导致绕过身份验证要求. CVE-2017-3169 第三方模块在HTTP请求HTTPS端口时,若调用ap_hook_process_connection(),则m

《Spark与Hadoop大数据分析》一一第2章 Apache Hadoop和Apache Spark入门

第2章 Apache Hadoop和Apache Spark入门 在本章,我们将学习 Hadoop 和 Spark 的基本知识,了解 Spark 与 MapReduce 有哪些不同,并开始安装集群和设置分析所需的工具.本章分为以下几个子主题:介绍 Apache Hadoop介绍 Apache Spark讨论为什么要配套使用 Hadoop 和 Spark安装 Hadoop 和 Spark 集群