1.编辑http.conf
(1)注释掉ServerName、DocumentRoot、ServerAdmin,同时注释掉DocumentRoot对应的Directory节点
(2)打开下面两个加载
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
(3)打开vhost文件的加载
Include conf/extra/httpd-vhosts.conf
2.编辑httpd-vhosts.conf
(1)设置NameVirtualHost *:80,*可以被一个特定的ip替代
(2)配置VirtualHost 节点
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.localhost
DocumentRoot "G:/eclipse-php/eclipse/workspace/test/htm"
ServerName dummy-host.localhost
ServerAlias www.dummy-host.localhost
ErrorLog "logs/dummy-host.localhost-error.log"
CustomLog "logs/dummy-host.localhost-access.log" common
DirectoryIndex index.php
<Directory "G:/eclipse-php/eclipse/workspace/test/htm">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>