监听多个端口
2.#增加监听端口
等以下内容都设置以后,可以通过netstat -n -a查看端口是否开启
开启虚拟站点
# Virtual hosts
#Include conf/extra/httpd-vhosts.conf
#修改为
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
配置PHP模块
加载php模块,php5apache2_2代表使用的是apache2.2或以上版本
LoadModule php5_module "c:/php/php5apache2_2.dll"
PHPIniDir "C:/php"
配置php文件类型映射
AddType application/x-httpd-php .php
配置conf/extra/httpd-vhosts.conf
如下
<VirtualHost *:8090>
ServerAdmin [email protected]
DocumentRoot "D:/server110"
ServerName www.server110.com
ErrorLog "logs/server110.com-error.log"
CustomLog "logs/server110.com-access.log" common
<Directory "D:/server110">
Options FollowSymLinks
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
一定要加上 <Directory></Directory>这段,否则会报403错误