Centos 6.5 编译安装apache2.4.x 并配置虚拟主机、SSL访问、基于用户的访问控制等

  • A+
所属分类:Linux  Linux基础

测试环境:centos 6.5 x86_64的系统
软件:apache2.4.10

apache2.4新特性

Loadable MPMs
可以在编译的时候将多个 MPM 做成可装卸式的。对 MPM 的选择也可以在运行的时候进行配置。
Event MPM
全面支持 Event MPM。这在 Apache 2.2 中还只是试验版本。
Asynchronous support
在支持的 MPM 和平台上提供更好的异步读/写支持。
Per-module and per-directory LogLevel configuration
可以针对不同的模块和目录设置不同的 LogLevel。在 debug 记录级别上增加了 trace1 到 trace8 的跟踪方法。
Per-request configuration sections
<If>, <ElseIf>, 和 <Else> 块可以用来在 可以在每次请求的级别上设定配置。
General-purpose expression parser
新的表达式解析器允许在指令(如 SetEnvIfExpr, RewriteCond, Header, <If> 等)中使用普通的句法指定复杂的条件。
KeepAliveTimeout in milliseconds
现在可以以毫秒(milliseconds)设置连接保持时间( KeepAliveTimeout)。
NameVirtualHost directive
不再需要,已弃用。
Override Configuration
新的 AllowOverrideList 允许对目录( .htaccess 中允许的目录)进行更加精细的控制。
Config file variables
现在可以在配置文件中定义和使用变量了。
Reduced memory usage
虽然增加了很多新功能,2.4.x 版 Apache 还是成功将内存占用降低了(相比 2.2.x 版)。


准备工作

在编译前还是需要做一些准备的。
1、如果服务器上之前有apache2.2.x那么我们需要停用apache2.2.x并取消其开机自动运行
2、apache2.4.x依赖的apr也需要1.4版本以上的,所以在编译前还需要编译高版本的qpr
3、制作apache2.4.x可用的启动脚本和配置开机启动等


一、停用apache2.2.x(Centos 自带的httpd服务)

[root@LookBack163 apr-1.5.1]# service httpd stop
Stopping httpd: [FAILED]
[root@LookBack163 apr-1.5.1]# chkconfig httpd off
[root@LookBack163 apr-1.5.1]# chkconfig --list | grep httpd
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off

二、apr >= 1.4版本的编译

高版本apr可以在官方网站下载 http://apr.apache.org/download.cgi

这里我采用apr1.5.1和apr-util-1.5.3的版本


[root@LookBack163 ~]# yum groupinstall "Development tools" "Server Platform Development" -y
[root@LookBack163 ~]# wget http://www.dwhd.org/tar_gz_bz2/apr-1.5.1.tar.gz
[root@LookBack163 ~]# wget http://www.dwhd.org/tar_gz_bz2/apr-util-1.5.3.tar.bz2
[root@LookBack163 ~]# tar xf apr-1.5.1.tar.gz
[root@LookBack163 ~]# tar xf apr-util-1.5.3.tar.bz2
[root@LookBack163 ~]# cd apr-1.5.1
[root@LookBack163 apr-1.5.1]# ./configure --prefix=/usr/local/apr151
[root@LookBack163 apr-1.5.1]# make -j4 &amp;amp;&amp;amp; make install
[root@LookBack163 apr-1.5.1]# cd ../apr-util-1.5.3
[root@LookBack163 apr-util-1.5.3]# ./configure --prefix=/usr/local/aprutil153 --with-apr=/usr/local/apr151/
[root@LookBack163 apr-util-1.5.3]# make -j4 &amp;amp;&amp;amp; make install &amp;amp;&amp;amp; cd ~

三、编译安装apache2.4.x

apache可以在官方网站下载 http://httpd.apache.org/download.cgi
[Downlink href="http://www.05hd.com/wp-content/uploads/2014/08/httpd-2.4.10.tar.bz2"]httpd-2.4.10.tar.bz2[/Downlink]
这里我采用的是apache2.4.10

[root@LookBack163 ~]# wget http://www.05hd.com/wp-content/uploads/2014/08/httpd-2.4.10.tar.bz2
[root@LookBack163 ~]# tar xf httpd-2.4.10.tar.bz2
[root@LookBack163 ~]# cd httpd-2.4.10
[root@LookBack163 httpd-2.4.10]# ./configure --prefix=/usr/local/apache2410 --sysconfdir=/etc/httpd2410 --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr151/ --with-apr-util=/usr/local/aprutil153/ --enable-mpms-shared=all --with-mpm=event --enable-modules=most
[root@LookBack163 httpd-2.4.10]# make -j4 &amp;amp;&amp;amp; make install

###如果在编译的时候提示错误为:
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
就安装pcre-devel然后再编译安装
[root@LookBack163 httpd-2.4.10]# yum install pcre-devel -y
#

接下来更新环境变量导入apache新版的bin和man+到处头文件

[root@LookBack163 ~]# echo "export PATH=/usr/local/apache2410/bin/:\$PATH" &amp;gt; /etc/profile.d/apache2410.sh
[root@LookBack163 ~]# sed -i "$(awk '$1=="MANPATH"{i=NR}END{print i}' /etc/man.config)a \MANPATH\tMANPATH /usr/local/apache2410/man" /etc/man.config
[root@LookBack163 ~]# ln -s /usr/local/apache2410/include/ /usr/include/apache
###这里的3部做完需要系统的环境变量生效,可以新开个shell进程 或者直接重启下系统
##重启后检查下
[root@LookBack163 ~]# echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/bind995/bin:/usr/local/bind995/sbin:/usr/local/apache2410/bin/:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
[root@LookBack163 ~]# man httpd
[root@LookBack163 ~]# httpd -v
Server version: Apache/2.4.10 (Unix)
Server built:   Aug 10 2014 12:25:37

现在我们可以来启动新版的httpd服务了

[root@LookBack163 ~]# apachectl start
AH00557: httpd: apr_sockaddr_info_get() failed for LookBack163.05hd.org
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
###出现上面的信息可以忽略

来看看80端口是否被监听了

[root@LookBack163 ~]# ss -utnl
Netid  State      Recv-Q Send-Q                                                         Local Address:Port                                                           Peer Address:Port
udp    UNCONN     0      0                                                                          *:111                                                                       *:*
udp    UNCONN     0      0                                                                          *:631                                                                       *:*
udp    UNCONN     0      0                                                                          *:760                                                                       *:*
udp    UNCONN     0      0                                                                          *:37776                                                                     *:*
udp    UNCONN     0      0                                                                          *:820                                                                       *:*
udp    UNCONN     0      0                                                              172.16.41.163:53                                                                        *:*
udp    UNCONN     0      0                                                              172.16.41.100:53                                                                        *:*
udp    UNCONN     0      0                                                                  127.0.0.1:53                                                                        *:*
udp    UNCONN     0      0                                                                         :::111                                                                      :::*
udp    UNCONN     0      0                                                                         :::760                                                                      :::*
udp    UNCONN     0      0                                                                         :::34273                                                                    :::*
tcp    LISTEN     0      128                                                                       :::111                                                                      :::*
tcp    LISTEN     0      128                                                                        *:111                                                                       *:*
tcp    LISTEN     0      128                                                                       :::80                                                                       :::*
tcp    LISTEN     0      10                                                             172.16.41.163:53                                                                        *:*
tcp    LISTEN     0      10                                                             172.16.41.100:53                                                                        *:*
tcp    LISTEN     0      10                                                                 127.0.0.1:53                                                                        *:*
tcp    LISTEN     0      128                                                                       :::22                                                                       :::*
tcp    LISTEN     0      128                                                                        *:22                                                                        *:*
tcp    LISTEN     0      128                                                                127.0.0.1:631                                                                       *:*
tcp    LISTEN     0      128                                                                      ::1:631                                                                      :::*
tcp    LISTEN     0      100                                                                      ::1:25                                                                       :::*
tcp    LISTEN     0      100                                                                127.0.0.1:25                                                                        *:*
tcp    LISTEN     0      128                                                                       :::54235                                                                    :::*
tcp    LISTEN     0      128                                                                        *:33671                                                                     *:* 

Centos 6.5 编译安装apache2.4.x 并配置虚拟主机、SSL访问、基于用户的访问控制等

来看看浏览器访问的结果

Centos 6.5 编译安装apache2.4.x 并配置虚拟主机、SSL访问、基于用户的访问控制等


四、配置apache2.4.x的启动脚本

第一种方法:(推荐)

[root@LookBack163 ~]# for I in $(ps -aux | grep [h]ttp |awk '{print$2}'); do kill -9 $I;done
[root@LookBack163 ~]# for I in $(ps -aux | grep [a]pache |awk '{print$2}'); do kill -9 $I;done
###上2行的命令是强制结束所有httpd的进程
[root@LookBack163 ~]# [ -f /etc/init.d/httpd ] &amp;amp;&amp;amp; mv /etc/init.d/httpd /etc/init.d/httpd.bak
[root@LookBack163 ~]# cp /usr/local/apache2410/bin/apachectl /etc/init.d/httpd
[root@LookBack163 ~]# sed -i '/#!\/bin\/sh/a \# chkconfig: 35 85 15\n# description: Activates\/Deactivates Apache 2.4.10' /etc/init.d/httpd
[root@LookBack163 ~]# chkconfig --add httpd
[root@LookBack163 ~]# chkconfig --list httpd
httpd          	0:off	1:off	2:off	3:off	4:off	5:off	6:off
[root@LookBack163 ~]# chkconfig httpd on
[root@LookBack163 ~]# chkconfig --list httpd
httpd          	0:off	1:off	2:on	3:on	4:on	5:on	6:off

第二种方法:

[root@LookBack163 ~]# [ -f /etc/init.d/httpd ] &amp;amp;&amp;amp; mv /etc/init.d/httpd /etc/init.d/httpd.bak
[root@LookBack163 ~]# wget -c4 -O /etc/rc.d/init.d/httpd "http://www.05hd.com/httpd.sh"
[root@LookBack163 ~]# chkconfig --add httpd
[root@LookBack163 ~]# chkconfig --list httpd
httpd          	0:off	1:off	2:off	3:off	4:off	5:off	6:off
[root@LookBack163 ~]# chkconfig httpd on
[root@LookBack163 ~]# chkconfig --list httpd
httpd          	0:off	1:off	2:on	3:on	4:on	5:on	6:off
###下面是启动脚本的源码
#!/bin/bash
#
# httpd        Startup script for the Apache HTTP Server
#
# chkconfig: - 85 15
# description: The Apache HTTP Server is an efficient and extensible  \
#	       server implementing the current HTTP standards.
# processname: httpd
# config: /etc/httpd/conf/httpd.conf
# config: /etc/sysconfig/httpd
# pidfile: /var/run/httpd/httpd.pid
#
### BEGIN INIT INFO
# Provides: httpd
# Required-Start: $local_fs $remote_fs $network $named
# Required-Stop: $local_fs $remote_fs $network
# Should-Start: distcache
# Short-Description: start and stop Apache HTTP Server
# Description: The Apache HTTP Server is an extensible server
#  implementing the current HTTP standards.
### END INIT INFO

# Source function library.
. /etc/rc.d/init.d/functions

#if [ -f /etc/sysconfig/httpd ]; then
#        . /etc/sysconfig/httpd
#fi

# Start httpd in the C locale by default.
HTTPD_LANG=${HTTPD_LANG-"C"}

# This will prevent initlog from swallowing up a pass-phrase prompt if
# mod_ssl needs a pass-phrase from the user.
INITLOG_ARGS=""

# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server
# with the thread-based "worker" MPM; BE WARNED that some modules may not
# work correctly with a thread-based MPM; notably PHP will refuse to start.

# Path to the apachectl script, server binary, and short-form for messages.
#apachectl=/usr/sbin/apachectl
apachectl=/usr/local/apache2410/bin/apachectl
httpd=${HTTPD-/usr/local/apache2410/bin/httpd}
prog=httpd
pidfile=${PIDFILE-/usr/local/apache2410/logs/httpd.pid}
lockfile=${LOCKFILE-/var/lock/subsys/httpd}
RETVAL=0
STOP_TIMEOUT=${STOP_TIMEOUT-10}

# The semantics of these two functions differ from the way apachectl does
# things -- attempting to start while running is a failure, and shutdown
# when not running is also a failure.  So we just do it the way init scripts
# are expected to behave here.
start() {
        echo -n $"Starting $prog: "
        LANG=$HTTPD_LANG daemon --pidfile=${pidfile} $httpd $OPTIONS
        RETVAL=$?
        echo
        [ $RETVAL = 0 ] &amp;amp;&amp;amp; touch ${lockfile}
        return $RETVAL
}

# When stopping httpd, a delay (of default 10 second) is required
# before SIGKILLing the httpd parent; this gives enough time for the
# httpd parent to SIGKILL any errant children.
stop() {
	echo -n $"Stopping $prog: "
	killproc -p ${pidfile} -d ${STOP_TIMEOUT} $httpd
	RETVAL=$?
	echo
	[ $RETVAL = 0 ] &amp;amp;&amp;amp; rm -f ${lockfile} ${pidfile}
}
reload() {
    echo -n $"Reloading $prog: "
    if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t &amp;gt;&amp;amp;/dev/null; then
        RETVAL=6
        echo $"not reloading due to configuration syntax error"
        failure $"not reloading $httpd due to configuration syntax error"
    else
        # Force LSB behaviour from killproc
        LSB=1 killproc -p ${pidfile} $httpd -HUP
        RETVAL=$?
        if [ $RETVAL -eq 7 ]; then
            failure $"httpd shutdown"
        fi
    fi
    echo
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
        status -p ${pidfile} $httpd
	RETVAL=$?
	;;
  restart)
	stop
	start
	;;
  condrestart|try-restart)
	if status -p ${pidfile} $httpd &amp;gt;&amp;amp;/dev/null; then
		stop
		start
	fi
	;;
  force-reload|reload)
        reload
	;;
  graceful|help|configtest|fullstatus)
	$apachectl $@
	RETVAL=$?
	;;
  *)
	echo $"Usage: $prog {start|stop|restart|condrestart|try-restart|force-reload|reload|status|fullstatus|graceful|help|configtest}"
	RETVAL=2
esac

exit $RETVAL

到此 新版的apache启动脚本就好了


 

五、apache上配置多虚拟机(基于端口 、基于IP和基于主机名的3种情况)

下面来看看/etc/httpd2410/httpd.conf的配置内容

[root@LookBack163 ~]# cat /etc/httpd2410/httpd.conf  | grep '^[^#]' | grep -vE '^[[:space:]]+#'
Listen 80
Listen 8080
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_core_module modules/mod_authn_core.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_core_module modules/mod_authz_core.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule reqtimeout_module modules/mod_reqtimeout.so
LoadModule filter_module modules/mod_filter.so
LoadModule mime_module modules/mod_mime.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule env_module modules/mod_env.so
LoadModule headers_module modules/mod_headers.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule version_module modules/mod_version.so
LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule dir_module modules/mod_dir.so
LoadModule alias_module modules/mod_alias.so
&amp;lt;IfModule unixd_module&amp;gt;
User daemon
Group daemon
&amp;lt;/IfModule&amp;gt;
ServerAdmin admin@05hd.com
ServerName LookBack163.05hd.com:80
&amp;lt;Directory /&amp;gt;
    AllowOverride none
    Require all denied
&amp;lt;/Directory&amp;gt;
DocumentRoot "/usr/local/apache2410/htdocs"
&amp;lt;Directory "/usr/local/apache2410/htdocs"&amp;gt;
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
&amp;lt;/Directory&amp;gt;
&amp;lt;IfModule dir_module&amp;gt;
    DirectoryIndex index.html
&amp;lt;/IfModule&amp;gt;
&amp;lt;Files ".ht*"&amp;gt;
    Require all denied
&amp;lt;/Files&amp;gt;
ErrorLog "logs/error_log"
LogLevel warn
&amp;lt;IfModule log_config_module&amp;gt;
    LogFormat "%h %l %u %t \"%r\" %&amp;gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %&amp;gt;s %b" common
    &amp;lt;IfModule logio_module&amp;gt;
      LogFormat "%h %l %u %t \"%r\" %&amp;gt;s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    &amp;lt;/IfModule&amp;gt;
    CustomLog "logs/access_log" common
&amp;lt;/IfModule&amp;gt;
&amp;lt;IfModule alias_module&amp;gt;
    ScriptAlias /cgi-bin/ "/usr/local/apache2410/cgi-bin/"
&amp;lt;/IfModule&amp;gt;
&amp;lt;IfModule cgid_module&amp;gt;
&amp;lt;/IfModule&amp;gt;
&amp;lt;Directory "/usr/local/apache2410/cgi-bin"&amp;gt;
    AllowOverride None
    Options None
    Require all granted
&amp;lt;/Directory&amp;gt;
&amp;lt;IfModule mime_module&amp;gt;
    TypesConfig /etc/httpd2410/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
&amp;lt;/IfModule&amp;gt;
Include /etc/httpd2410/extra/httpd-vhosts.conf
&amp;lt;IfModule proxy_html_module&amp;gt;
Include /etc/httpd2410/extra/proxy-html.conf
&amp;lt;/IfModule&amp;gt;
&amp;lt;IfModule ssl_module&amp;gt;
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
&amp;lt;/IfModule&amp;gt;
&amp;lt;Directory /&amp;gt;
    AllowOverride none
    Require all denied
&amp;lt;/Directory&amp;gt;
DocumentRoot "/usr/local/apache2410/htdocs"
&amp;lt;Directory "/usr/local/apache2410/htdocs"&amp;gt;
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
&amp;lt;/Directory&amp;gt;
&amp;lt;IfModule dir_module&amp;gt;
    DirectoryIndex index.html
&amp;lt;/IfModule&amp;gt;
&amp;lt;Files ".ht*"&amp;gt;
    Require all denied
&amp;lt;/Files&amp;gt;
ErrorLog "logs/error_log"
LogLevel warn
&amp;lt;IfModule log_config_module&amp;gt;
    LogFormat "%h %l %u %t \"%r\" %&amp;gt;s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
    LogFormat "%h %l %u %t \"%r\" %&amp;gt;s %b" common
    &amp;lt;IfModule logio_module&amp;gt;
      LogFormat "%h %l %u %t \"%r\" %&amp;gt;s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
    &amp;lt;/IfModule&amp;gt;
    CustomLog "logs/access_log" common
&amp;lt;/IfModule&amp;gt;
&amp;lt;IfModule alias_module&amp;gt;
&amp;lt;/IfModule&amp;gt;
&amp;lt;IfModule cgid_module&amp;gt;
&amp;lt;/IfModule&amp;gt;
&amp;lt;Directory "/usr/local/apache2410/cgi-bin"&amp;gt;
    AllowOverride None
    Options None
    Require all granted
&amp;lt;/Directory&amp;gt;
&amp;lt;IfModule mime_module&amp;gt;
    TypesConfig /etc/httpd2410/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
&amp;lt;/IfModule&amp;gt;
Include /etc/httpd2410/extra/httpd-vhosts.conf
&amp;lt;IfModule proxy_html_module&amp;gt;
Include /etc/httpd2410/extra/proxy-html.conf
&amp;lt;/IfModule&amp;gt;
&amp;lt;IfModule ssl_module&amp;gt;
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
&amp;lt;/IfModule&amp;gt;

下面来看看/etc/httpd2410/extra/httpd-vhosts.conf的配置内容

[root@LookBack163 ~]# cat /etc/httpd2410/extra/httpd-vhosts.conf | grep '^[^#]'
&amp;lt;VirtualHost 172.16.41.163:80&amp;gt;
	ServerAdmin admin@05hd.com
	ServerName www1.05hd.com
	DocumentRoot "/web/hosta"
	ErrorLog "logs/www1.05hd.com-erro_log"
	CustomLog "logs/www1.05hd.com-access_log" common
	&amp;lt;Directory "/web/hosta" &amp;gt;
		Require all granted
	&amp;lt;/Directory&amp;gt;
&amp;lt;/VirtualHost&amp;gt;
&amp;lt;VirtualHost 172.16.41.100:80&amp;gt;
	ServerAdmin admin@05hd.com
	ServerName www2.05hd.com
	DocumentRoot "/web/hostb"
	ErrorLog "logs/www2.05hd.com-error_log"
	CustomLog "logs/www2.05hd.com-access_log" common
	&amp;lt;Directory "/web/hostb" &amp;gt;
		Require all granted
	&amp;lt;/Directory&amp;gt;
&amp;lt;/VirtualHost&amp;gt;
&amp;lt;VirtualHost 172.16.41.163:8080 172.16.41.163:80&amp;gt;
	ServerAdmin admin@05hd.com
	ServerName www3.05hd.com
	DocumentRoot "/web/hostc"
	ErrorLog "logs/www3.05hd.com-error_log"
	CustomLog "logs/www3.05hd.com-access_log" common
	&amp;lt;Directory "/web/hostc" &amp;gt;
		Require all granted
	&amp;lt;/Directory&amp;gt;
&amp;lt;/VirtualHost&amp;gt;

接下来制作3个虚拟机的index.html测试页面

[root@LookBack163 extra]# echo "
&amp;lt;h1&amp;gt;This is A&amp;lt;/h1&amp;gt;

" &amp;gt; /web/hosta/index.html
[root@LookBack163 extra]# echo "
&amp;lt;h1&amp;gt;This is B&amp;lt;/h1&amp;gt;

" &amp;gt; /web/hostb/index.html
[root@LookBack163 extra]# echo "
&amp;lt;h1&amp;gt;This is C&amp;lt;/h1&amp;gt;

" &amp;gt; /web/hostc/index.html

重新启动下httpd并看看端口监听状况

[root@LookBack163 ~]# apachectl restart
[root@LookBack163 ~]# ss -utnl
Netid  State      Recv-Q Send-Q                                                         Local Address:Port                                                           Peer Address:Port
udp    UNCONN     0      0                                                                          *:111                                                                       *:*
udp    UNCONN     0      0                                                                          *:631                                                                       *:*
udp    UNCONN     0      0                                                                          *:764                                                                       *:*
udp    UNCONN     0      0                                                                          *:48421                                                                     *:*
udp    UNCONN     0      0                                                              172.16.41.163:53                                                                        *:*
udp    UNCONN     0      0                                                              172.16.41.100:53                                                                        *:*
udp    UNCONN     0      0                                                                  127.0.0.1:53                                                                        *:*
udp    UNCONN     0      0                                                                          *:824                                                                       *:*
udp    UNCONN     0      0                                                                         :::111                                                                      :::*
udp    UNCONN     0      0                                                                         :::764                                                                      :::*
udp    UNCONN     0      0                                                                         :::50874                                                                    :::*
tcp    LISTEN     0      128                                                                       :::111                                                                      :::*
tcp    LISTEN     0      128                                                                        *:111                                                                       *:*
tcp    LISTEN     0      128                                                                       :::8080                                                                     :::*
tcp    LISTEN     0      128                                                                       :::80                                                                       :::*
tcp    LISTEN     0      10                                                             172.16.41.163:53                                                                        *:*
tcp    LISTEN     0      10                                                             172.16.41.100:53                                                                        *:*
tcp    LISTEN     0      10                                                                 127.0.0.1:53                                                                        *:*
tcp    LISTEN     0      128                                                                       :::22                                                                       :::*
tcp    LISTEN     0      128                                                                        *:22                                                                        *:*
tcp    LISTEN     0      128                                                                127.0.0.1:631                                                                       *:*
tcp    LISTEN     0      128                                                                      ::1:631                                                                      :::*
tcp    LISTEN     0      100                                                                      ::1:25                                                                       :::*
tcp    LISTEN     0      100                                                                127.0.0.1:25                                                                        *:*
tcp    LISTEN     0      128                                                                        *:38142                                                                     *:*
tcp    LISTEN     0      128                                                                       :::53573                                                                    :::* 

Centos 6.5 编译安装apache2.4.x 并配置虚拟主机、SSL访问、基于用户的访问控制等

最后用浏览器来看看
Centos 6.5 编译安装apache2.4.x 并配置虚拟主机、SSL访问、基于用户的访问控制等

Centos 6.5 编译安装apache2.4.x 并配置虚拟主机、SSL访问、基于用户的访问控制等

Centos 6.5 编译安装apache2.4.x 并配置虚拟主机、SSL访问、基于用户的访问控制等


六、配置SSL访问

未完待续

lookback

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: