配置httpd.conf
监听多个端口
复制代码代码如下:
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# 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
<VirtualHost *:80>
DocumentRoot /home/hcxing.com.cn_20120109/
ServerName www.hcxing.com.cn
<Directory /home/hcxing.com.cn_20120109/>
Options FollowSymLinks
AllowOverride All
order allow,deny
Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:808>
DocumentRoot /cacti
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /cacti>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
转载于:https://blog.51cto.com/453891/830442