/Apache/conf/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "F:/xxx/xxx" <- code
ServerName myhost.example.com
ErrorLog "logs/myhost.example.comm-error.log"
CustomLog "logs/myhost.example.com-access.log" common
</VirtualHost>/Apache/conf/httpd.conf:
# Virtual hosts
Include conf/extra/httpd-vhosts.conf- Restart Server
注意
添加host映射:127.0.0.1 myhost.example.com。