linux 下Apache 多端口多站点配置方法
配置httpd.conf监听多个端口
复制代码代码如下:
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
Listen 808
Listen 8080
#增加监听端口
等以下内容都设置以后,可以通过netstat -n -a查看端口是否开启
开启虚拟站点
复制代码代码如下:
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
#修改为
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
DocumentRoot /home/hcxing.com.cn_20120109/
ServerName www.hcxing.com.cn
Options FollowSymLinks
AllowOverride All
order allow,deny
Allow from all
DocumentRoot /cacti
Options FollowSymLinks
AllowOverride None
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
页:
[1]