1.在Apache的httpd的httpd.conf文件中找到并修改如下
# Virtual hosts
Include conf/extra/httpd-vhosts.conf
2.在extra文件夹下的httpd-vhosts.conf文件中加入
<VirtualHost *:80>
DocumentRoot "Zend工程的public目录绝对路径"
ServerName 域名
# This should be omitted in the production environment
SetEnv APPLICATION_ENV development
<Directory "Zend工程的public目录绝对路径" >
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
注:如果是用的Zend Studio的话,新建一个Zend工程里面的doc文件夹下会有README.txt这个文件,里面就自动帮你生成了以上适配好的xml属性
3.修改本机的hosts文件
文件位于C:/Windows/system32/drivers/etc/路径下
务必加上
127.0.0.1 域名
4.重新启动httpd服务器